Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Getting rid of first space?by jimmybeaches (Initiate) |
on Mar 16, 2003 at 03:29 UTC ( [id://243410]=perlquestion: print w/replies, xml ) | Need Help?? |
jimmybeaches has asked for the wisdom of the Perl Monks concerning the following question:
Hola!!! Just back from Mexico and I like saying Hola instead of hello... it's quicker :) So, I am new to Perl... bought a book and I think I am off the right start with chomp or chop, except I am trying to remove a blank space from the front of a line. I am simply trying to open the contents of a text file into an array and print them, except every line AFTER the first line prints with a blank space in front of it?! Is there some way of stripping the blank space away from every line in the array?
Contents of the text file:
the code in my script:
The file prints like this:
Is there a way to reverse what chop? (if that makes any sense...)
Back to
Seekers of Perl Wisdom
|
|