phoenix24x
IS-IT--Management
hello,
i am attempting to parse the path of a file into 2 variables.
here is the code:
$fullFilePath = "Q:\yes\iam\perl\newbie\file.txt";
$pathto,$file = substr($fullFile =~ m/(.*)\\(.*)/i);
print $pathto;
print $file;
the error is:
Not enough arguments for substr at Y:\pdf\test.pl line 2, near "m/(.*)\\(.*)/i)"
i was under the impression that each set of parans specified an argument. 2 arguments, 2 variables
i am attempting to parse the path of a file into 2 variables.
here is the code:
$fullFilePath = "Q:\yes\iam\perl\newbie\file.txt";
$pathto,$file = substr($fullFile =~ m/(.*)\\(.*)/i);
print $pathto;
print $file;
the error is:
Not enough arguments for substr at Y:\pdf\test.pl line 2, near "m/(.*)\\(.*)/i)"
i was under the impression that each set of parans specified an argument. 2 arguments, 2 variables