The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
Saving output from awk into a perl variable
.
User Name
Remember Me?
Password
google unix.com
Forums
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Saving output from awk into a perl variable
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
4
(
permalink
)
10-09-2008
otheus
Moderator ala Mode
Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,886
He's processing a file stored in $_. For that, the awk one-liner looks nicer. But it would normally be replaced with:
Code:
my @test; if (open(FOO,$_)) { while ($_=<FOO>) { push @test,(split)[4]; } } $test=join(" ",@test);
otheus
View Public Profile
Visit otheus's homepage!
Find all posts by otheus
Find otheus's past nominations received
Find otheus's present nominations given