in reply to Re: stat on file name containing single quotes
in thread stat on file name containing single quotes
The line is in fact read from a text file. Here is some simplified code that reads from a file containing only the one line I am talking about here.
use 5.12.0; use strict; use warnings; use Carp; open IN,"<DirList.txt"; my $fn=<IN>; chomp $fn; say $fn; my @st=stat $fn; if (@st) { say "Array defined"; } else { say "Array undefined"; }
The result is:
E:\Music\Ray LaMontagne\2010 - God Willin' & The Creek Don't Rise Array undefined
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: stat on file name containing single quotes
by perlpipe (Acolyte) on Jul 31, 2015 at 15:06 UTC | |
by tye (Sage) on Jul 31, 2015 at 15:43 UTC | |
|
Re^3: stat on file name containing single quotes
by perlpipe (Acolyte) on Jul 31, 2015 at 16:42 UTC | |
by tye (Sage) on Jul 31, 2015 at 20:44 UTC |