Help for this page

Select Code to Download


  1. or download this
    return1=`/path/to/script.pl arg1 arg2`
    return2=$(/path/to/script.pl arg1 arg2)
    
  2. or download this
    return_newlines="$(/path/to/script.pl arg1 arg2)"
    
  3. or download this
    #!/usr/bin/perl
    print $_, $/ for @ARGV;
    
  4. or download this
    #!/bin/bash
    value=0
    ...
            echo "value is $value"
    done <<<"$(./script.pl arg1 arg2)"
    echo "finally, value is $value"
    
  5. or download this
    value starts from 0
    value is arg1
    ...
    value is arg1
    value is arg2
    finally, value is arg2