Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Reading from terminal

by eighty-one (Curate)
on Nov 15, 2008 at 17:52 UTC ( [id://723813]=note: print w/replies, xml ) Need Help??


in reply to Reading from terminal

Without a code example it's hard to know why it's working the way it is instead of the way you want.

The first thing that comes to mind, is how are you executing the external program? System or backticks?

Try using backticks and assigning the results to a variable; i.e.:

my $passwd = `cat /etc/passwd`;

Note that those are backticks (`) which share the same key as the tilde (~)(at least on my keyboard, but I'm not a Mac user, so YMMV), not single quotes (').

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (7)
As of 2024-04-18 10:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found