in reply to Re^2: While is not working when using variable
in thread While is not working when using variable
Note that, if you have your complete filename in a variable, like in your OP (and as you should, as it eases debugging and error messages), quoting it in the open statement is superfluous.print $filename, "\n";
Besides, most Windows functions and many programs accept forward slashes, so you can write
Update: corrected quotes - d'oh! Thanks AnomalousMonk!my $filename="$mydir/file_detail.txt"; open (FILE, "<", $filename);
|
|---|