Maybe tell us what you are trying to do?
Try this:
> #!/usr/bin/perl -w
> use strict;
> my $input = $ARGV[0];
# File handle
my $FH;
# Check the file is a normal file and exists
die "File does not exist\n" if not -f $input;
# Open the file handle for read only, file named by $input
# Or die and print $! which is probably not the error message
# variable. perlvar would tell you the corrent variable.
open $FH, '<', $input or die "$!";
# Read from the file handle
my @devices = <$FH> ;
# The the array elements with a ", "
> print "devices = ", join (", ", @devices), " \n";
>
> __END__
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/