in reply to Passing data from one script to another
HTH.#!/usr/bin/perl -w # # This script is set up to accept *3* parameters: # >./perl_argv.pl abc 123 xyz use strict; my $arg1 = shift; my $arg2 = shift; my $arg3 = shift; if (! $arg1) { print "Didn't get 1st argument!\n"; } else { print "1st argument = $arg1\n"; } if (! $arg2) { print "Didn't get 2nd argument!\n"; } else { print "2nd argument = $arg2\n"; } if (! $arg3) { print "Didn't get 3rd argument!\n"; } else { print "3rd argument = $arg3\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Passing data from one script to another
by hmerrill (Friar) on May 02, 2003 at 15:24 UTC | |
|
Re: Re: Passing data from one script to another
by Anonymous Monk on May 02, 2003 at 15:48 UTC |