[Israel.pm] awk equivalent

Yossi.Itzkovich at ecitele.com Yossi.Itzkovich at ecitele.com
Mon Mar 22 22:55:56 PST 2004


Your version (and Oron's) are the ones I looked for.

Thanks,
Yossi



                                                                                                                                   
                      "Offer Kaye"                                                                                                 
                      <oferk at oren.co.i         To:      "Perl in Israel" <perl at perl.org.il>                                        
                      l>                       cc:                                                                                 
                      Sent by:                 Subject: RE: [Israel.pm] awk equivalent                                             
                      perl-bounces at per                                                                                             
                      l.org.il                                                                                                     
                                                                                                                                   
                                                                                                                                   
                      03/23/2004 08:34                                                                                             
                      Please respond                                                                                               
                      to Perl in                                                                                                   
                      Israel                                                                                                       
                                                                                                                                   
                                                                                                                                   



>
> Hi,
>
> What is the Perl equivalent of:
>

Haven't you asked this already? Oh well, here's my version:
1. awk '{print $3}' filename
vs.
1. perl -alpe'$_=$F[2]' filename

2. awk -Fc '{print $3}' filename
vs.
2. perl -Fc -alpe'$_=$F[0]' filename

> I know how to get it done in Perl, but my question is about "equivalent"
> code.
>
> Yossi

If you know how to do it, what are you asking? Obviously TIMTOWTDI (duh!),
so how do you define "equivalent" in this context? The "best" way? The most
"awk like" way? What?

----------------------------------
Offer Kaye
_______________________________________________
Perl mailing list
Perl at perl.org.il
http://www.perl.org.il/mailman/listinfo/perl







More information about the Perl mailing list