Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: shell read of val

by roboticus (Chancellor)
on May 16, 2018 at 18:15 UTC ( #1214677=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    $x = `echo foo`;
  2. or download this
    $ cat
    use strict;
    print "OK, command is done!\n\n";
    print "Now let's see what we captured:\n<$x>\n";
  3. or download this
    $ perl
    Let's do a command:
    Now let's see what we captured:
  4. or download this
    print $x;
  5. or download this
    my @results = `command`;
  6. or download this
    my @foo = grep /foo/ @results;
  7. or download this
    if (0 == @foo) {
        print "The command didn't find 'foo'\n";
    else {
        print "Found 'foo'!\n";
  8. or download this
    # Do the thing
    my @results = `command`;
    else {
        print "Found 'foo'!\n";

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (2)
As of 2022-01-16 11:24 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (49 votes). Check out past polls.