There's more than one way to do things | |
PerlMonks |
Re: different output from gzwriteby jsprat (Curate) |
on Jul 12, 2003 at 04:07 UTC ( [id://273595]=note: print w/replies, xml ) | Need Help?? |
Just gzwrite @your_array; The reason is the same reason you get similar output if you print "@some_array"; when each element ends with a newline. Each element is separated with $" (also known as the list separator), which defaults to a space. Either leave out the quotes, locally change $" to '' or use something like join '', @your_array; For an in depth treatment see perlfaq5 and search for "weird spaces" - or at a prompt type perldoc -q "weird spaces" Good luck!
In Section
Seekers of Perl Wisdom
|
|