Re: Looping Control structures

2002-06-25 Thread Jeff 'japhy' Pinyan
On Jun 25, bob ackerman said: >> perl -lane'$a{$F[0]}++or$a=qw/box robo rain/[$b++%3];print"$F[0] $a"' >> yourfile.txt >i assume things like '$a' ,'$b', and '$F' come from those switches, so >only question is... @F comes from the -a switch used in conjunction with -n. $a, %a, and $b are just

Re: Looping Control structures

2002-06-25 Thread Felix Geerinckx
on Tue, 25 Jun 2002 16:45:31 GMT, Bob Ackerman wrote: > where are those command line switches documented? > i would have thought 'perldoc perl' ... but, i didn't see it there, nor > apparently in any other doc title it mentioned perldoc perlrun perlrun - how to execute the Perl interpre

Re: Looping Control structures

2002-06-25 Thread bob ackerman
On Tuesday, June 25, 2002, at 04:59 AM, John W. Krahn wrote: > Will Shiver wrote: [...] > perl -lane'$a{$F[0]}++or$a=qw/box robo rain/[$b++%3];print"$F[0] $a"' > yourfile.txt > > > John sure. almost obviously. but... i assume things like '$a' ,'$b', and '$F' come from those switches, so on

Re: Looping Control structures

2002-06-25 Thread drieux
On Monday, June 24, 2002, at 05:10 , Will Shiver wrote: > black robo plan A: my %kombo = ( blue=> 'box', red => 'robo', purple => 'rain', green => 'box', black => 'robo', ); hence one would read with say while() {

Re: Looping Control structures

2002-06-25 Thread John W. Krahn
Will Shiver wrote: > > I have a file that I would like to read thru line by > line and print somthing based on when the value in > the first field postion stays the same. I would change > the tag value amongst 3 different values. > > Example file: > blue jay > blue bery > blue bird > red apple