in reply to open file error
Hi t-rex,
Item 4 from the Basic debugging checklist: Use Data::Dumper.
use Data::Dumper; my $run_cmd = "a b c >logfile.txt "; my ($logfile) = (split />/,$run_cmd)[-1]; chomp($logfile); my $pagal = "foo/$logfile"; my $pagal2 = "foo/logfile.txt"; print Dumper($logfile, $pagal, $pagal2); __END__ $VAR1 = 'logfile.txt '; $VAR2 = 'foo/logfile.txt '; $VAR3 = 'foo/logfile.txt';
See How do I strip blank space from the beginning/end of a string?
Hope this helps,
-- Hauke D
|
|---|