#!/usr/bin/perl ######################################################################## # Read a file , split the data and print # Open an input file ######################################################################## open(INFILE, ") { chomp ($record); @info = split(/:/,$record); #split the $rec & return @array print "Username: \t $info[0] \n"; print "Password: \t $info[1] \n"; print "Userid: \t $info[2] \n"; print "Groupid: \t $info[3] \n"; print "Full Name: \t $info[4] \n"; print "Home Dir: \t $info[5] \n"; print "Unix Shell: \t $info[6] \n"; print "\n"; } close(INFILE);