Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Assigning output of unix command to a variable

by bichonfrise74 (Vicar)
on Dec 23, 2009 at 01:34 UTC ( #814036=note: print w/ replies, xml ) Need Help??


in reply to Assigning output of unix command to a variable

What do you mean by "can't get past the '|' in the nslookup"? Consider this example.

#!/usr/bin/perl use strict; my $node = qx( nslookup www.perlmonks.org | awk -F Name: '{ print \$2 }' ); print $node;


Comment on Re: Assigning output of unix command to a variable
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://814036]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-11-22 21:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (125 votes), past polls