Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need to read that file and get the following variables sat :[CODE] 1000 [PASS] AMY AMY2376G NOOR NOO2376G MONK MON2376G
I don't seem to grep what i need correctly , I am trying somthing like :$code = 1000 $user1 = AMY $pass1 = AMY2376G $user2 = NOOR $pass2 = NOO2376G . . etc
just not sure how to get to the second line after getting the thing I am looking for ,, can someone help. thanksopen ( input , "../input" ) or die " .... "; while (<input>) { my $code=$_ if /^CODE/ . . . }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: reading an input file
by Vautrin (Hermit) on Jan 22, 2004 at 22:06 UTC | |
|
Re: reading an input file
by duff (Parson) on Jan 22, 2004 at 22:46 UTC | |
by Anonymous Monk on Jan 22, 2004 at 23:17 UTC | |
by duff (Parson) on Jan 23, 2004 at 03:46 UTC | |
by ysth (Canon) on Jan 23, 2004 at 05:18 UTC | |
|
Re: reading an input file
by pzbagel (Chaplain) on Jan 22, 2004 at 21:49 UTC | |
|
Re: reading an input file
by daddyefsacks (Pilgrim) on Jan 22, 2004 at 21:52 UTC |