Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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;

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://814036]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2016-12-10 20:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (165 votes). Check out past polls.