akm2 has asked for the wisdom of the Perl Monks concerning the following question:
The expression is intented to trim the spaces off the front and back of a string. Example: " Andrew Mitchell" would be trimmed to "Andrew Mitchell"
Thats not happening. Here is the code, Any advise?
($BKCUM_CNUM[$i]) = substr ($line, 0, 7) =~ m/^\s*(.*)\s*$/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular Expression and trimming
by Tuna (Friar) on Mar 08, 2001 at 20:59 UTC | |
|
Re: Regular Expression and trimming
by danger (Priest) on Mar 08, 2001 at 21:04 UTC | |
|
Re: Regular Expression and trimming
by arhuman (Vicar) on Mar 08, 2001 at 21:01 UTC |