in reply to Re: Convert from awk to perl
in thread Convert from awk to perl
That won't quite work--braces, {}, are always required for blocks in Perl. So, for instance, the first "if" statement would need to be written as:
Update: Or to be a bit more "Perlish" you could write:if ( substr($F[2],0,3) eq "eth" ) { $process=1; }
Update 2: Correction of string comparisons, as per Anonymous Monk.$process=1 if (substr($F[2],0,3) eq "eth");
In Section
Seekers of Perl Wisdom