AndrewMcHorney wrote:
Hello

Hello,

I am working on a script that does a directory of a Windows drive. There are some lines returned where there are spaces before the 1st character.

If it's the first character then by definition it can't have anything before it.

This throws off the splitting of the line into an array.

Then you are doing it wrong. If you use split correctly it will not matter if there are leading spaces.

How can I strip the leading characters in an efficient way into either
the same string or a new string.

perldoc -q "How do I strip blank space from the beginning/end of a string"



John
--
Perl isn't a toolbox, but a small machine shop where you
can special-order certain sorts of tools at low cost and
in short order.                            -- Larry Wall

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to