Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
what I want to do is read that file and then print some sort of schedule , somthing like:EmpNum LOCATION Shift 23 54 1 11 65 3 23 54 2
I am not sure how to read the file in an easy way, I was trying somthing like:EmpNum LOCATION shift 23 54 1 54 2 11 65 3
Can someone help showing me a good way to do it ... thanks a lotWhile(<DATA>) { next if ($_ =~ /^#/ || $_ =~ /^EmpNum/); push (@EMP, $_); foreach $emp (@EMP) { push (@emp, EMP[#emp]) } }
Edit by tye, fix CODE tag as /CODE.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: complex input file
by Roger (Parson) on Feb 18, 2004 at 04:47 UTC | |
by Anonymous Monk on Feb 18, 2004 at 05:06 UTC | |
by Roger (Parson) on Feb 18, 2004 at 05:41 UTC | |
by Anonymous Monk on Feb 18, 2004 at 05:36 UTC | |
by Roger (Parson) on Feb 18, 2004 at 05:40 UTC | |
by Anonymous Monk on Feb 18, 2004 at 05:52 UTC | |
by Anonymous Monk on Feb 18, 2004 at 05:57 UTC | |
by Anonymous Monk on Feb 18, 2004 at 06:00 UTC |