Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
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?
[marto]: good morning all

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-02-20 10:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (268 votes). Check out past polls.

    Notices?