J
Jürgen Exner
Edward said:Suppose I have this snippet
which take files as input argument.
I guess you mean the arguments are file names, not files?
$file = $ARGV[0];
open(FILE,"<$file");
@array = <FILE>;
close(FILE);
Is there anyway we can convert $file
into strings (of file name)?
There is no variable type "string" in Perl. $file is a scalar. And any
scalar has a text representation.
So, for all practical purposes $file _is_ a string already and can be
treated just like a string (it's also a number, but that is irrelevant
here).
In so far you question doesn't make sense. What are you trying to do?
jue