Re: Joining 2 strings
From: Joe Smith (Joe.Smith_at_inwap.com)
Date: 08/28/04
- Next message: Anno Siegel: "Re: Execute Windows program from Perl script (??)"
- Previous message: Anno Siegel: "Re: how many days ago is 2003-07-20 ?"
- In reply to: Sim: "Re: Joining 2 strings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 28 Aug 2004 21:11:08 GMT
Sim wrote:
> s/^\s*((.*\S)?)\s*$/$1/; #removes spaces before and after the string
That takes longer to execute than doing it in two steps.
s/^\s+//;
s/\s+$//;
See
perldoc -q "blank space"
for more info.
-Joe
- Next message: Anno Siegel: "Re: Execute Windows program from Perl script (??)"
- Previous message: Anno Siegel: "Re: how many days ago is 2003-07-20 ?"
- In reply to: Sim: "Re: Joining 2 strings"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]