Rob Dixon <rob.di...@gmx.com> writes:

>> And then (trying to print just the time column
>>   perl -i -n -a -e 'print @F[6];' ping.lst
>>
>> But there is no output at all.
>
> The -i option calls for in-place editing, where the output from Perl
> replaces the input file. Take a look at ping.lst and you should find
> your output. If you want to see the output on the console, just remove
> -i and, if you would prefer to see each item on a separate line, add -l
> like this
>
>     perl -l -n -a -e 'print @F[6]' ping.lst

Egad, that was a dimwitted oversight about -i.  Thanks, that small
script shows a nice way to make use of perl similarly and as handy as
awk.


-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to