$
$_
I have a string like this:
-rwx------ 1 user group 0 Jan 06 15:07 a file with spaces
and im placing that string in an array with this command:
my @dline = split(' ', $dirline);
now notice that there are three spaces between 'with spaces'
so when i re-stringify this array using this command:
my $filename = join(' ', @dline);
$filename now contains 'a file with spaces'
notice only one space between 'with spaces'
did split eat my extra spaces? i doubt it would have eaten other chars.
any suggestions or explanations? perhaps another way of doing this?
thanks, and i hope my post hasnt upset you very much, have a nice day
-rwx------ 1 user group 0 Jan 06 15:07 a file with spaces
and im placing that string in an array with this command:
my @dline = split(' ', $dirline);
now notice that there are three spaces between 'with spaces'
so when i re-stringify this array using this command:
my $filename = join(' ', @dline);
$filename now contains 'a file with spaces'
notice only one space between 'with spaces'
did split eat my extra spaces? i doubt it would have eaten other chars.
any suggestions or explanations? perhaps another way of doing this?
thanks, and i hope my post hasnt upset you very much, have a nice day