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

Re: perl child to return var to a bash parent

by shmem (Chancellor)
on May 02, 2011 at 13:17 UTC ( [id://902513]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl
    # line 2 array.pl 
    @ary = $ARGV[0] eq '-n'? (10..15) : (a..f);
    print "@ary\n";
    
  2. or download this
    #!/usr/bin/perl
    # line 2 script hash.pl
    ...
        quux => 0,
    );
    print "$_ $hash{$_}\n" for sort keys %hash;
    
  3. or download this
    #!/bin/bash
    # script example.sh
    ...
    do
        echo string: $key, number: $value
    done
    
  4. or download this
    bash$ ./example.sh
    10 is a
    ...
    string: bar, number: 1000
    string: foo, number: 42
    string: quux, number: 0
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-26 02:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found