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 -->
#
2
(
permalink
)
10-08-2008
otheus
Moderator ala Mode
Join Date: Feb 2007
Location: Innsbruck, Austria
Posts: 1,893
Perl
supports the "backtick" operator, just as in the shell. the only difference is that
Perl
doesn't convert linefeeds to spaces nor squeeze extra spaces. So:
Code:
$test=`awk .... $_`;
is probably what you want.
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