in reply to odd behavior with DATA section
Also note that for the path creation you can use File::Pathwhile (my $line = <DATA>) { chomp $line; $line =~ s/\s*#.*//; unless $line =~ /\S/; ... }
As for the original issue, I'm not sure where those blanks are coming from.. It doesn't seem like it's one trailing line at the end of DATA.. to debug further i would first try this and hope the answer becomes apparent:my $dir = "$base_dir/$filepath" do { mkpath $dir; print "Made $dir\n"; } unless -d $dir;
warn "Line: ==$line=="; my ($filename, $filepath) = split '\t', $line; warn "filename: '$filename' --- filepath: '$filepath'";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: odd behavior with DATA section
by Nkuvu (Priest) on Jul 23, 2005 at 01:10 UTC |