in reply to Script behaving differently on Linux vs windows
my $configFile="/home/testuser/perl/config.properties"; ... chomp $splitLine[1];
The file contains Windows newlines (\r\n), but you only remove the trailing newline \n, leaving the \r at the end.
Instead of chomp, remove all whitespace from the end of each line:
$splitLine[1] =~ s!\s*$!!;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Script behaving differently on Linux vs windows
by venu2016 (Initiate) on May 16, 2016 at 19:20 UTC |