Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: running string as perl script and pass into STDIN programatically

by aitap (Deacon)
on Feb 17, 2013 at 18:43 UTC ( #1019188=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use IPC::Run 'run';
    my ($stdout, $stderr);
    run [ qw/perl -e/, $code ], '<', \$args, '>>', \$stdout, '2>>', \$stde
    +rr;
    
  2. or download this
    $ perl
    my $code = q[use feature 'say'; say for 1..10; warn 'zzz'; $z = <STDIN
    +>; $z=~y/a-z/A-Z/; say $z];
    my $args = q[this is STDIN, why not?];
    ...
    
    STDERR: zzz at -e line 1.
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (16)
As of 2014-10-23 13:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (125 votes), past polls