Should be ^ not $ to remove leading and \s+$ to remove trailing.
Wags ;)
-----Original Message-----
From: Carl Rogers [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 13:46
To: [EMAIL PROTECTED]; Perl Help
Subject: Re: Remove White Space
At 04:13 PM 8/6/2001 -0400, Scott Martin wrote:
>How can I remove white space from the beginning of a variable?
$variable =~ s/$\s+//;
removes one or more spaces in the beginning
HTH
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]