[lug] Perl question

Evelyn Mitchell efm at tummy.com
Wed Mar 14 17:20:10 MST 2001

On Wed, Mar 14, 2001 at 05:07:27PM -0700, KELLEY SCOTT T wrote:
> All I want to do is check whether some file names have been entered on the
> command line, and if not ask the user for the filenames. The name of the
> perl script is "blastem" so execution would look like this:
> >blastem [filename1] [filename2]
> or this
> >blastem

$testme = shift @ARGV;   # pop off the leftmost item passed on the commandline
                             into $testme

> Also I forget how to convert from strings to ints (e.g. '3' to 3).

It's automagical in perl. Just use one as the other.

Evelyn Mitchell
efm at tummy.com

More information about the LUG mailing list