Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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
  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?

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2015-11-28 19:06 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (743 votes), past polls