Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Reading from terminal

by eighty-one (Curate)
on Nov 15, 2008 at 17:52 UTC ( #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? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (2)
As of 2021-10-20 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (81 votes). Check out past polls.

    Notices?