Re: trim function

2003-06-11 Thread Rob Dixon
Jair Santos wrote: Hi all, say that use strict;# always use warnings; # usually $directory = C:\\directory\\*.* Use single quotes for cuter code. my $directory = 'C:\directory\*.*'; and I am trying to remove the *.* from the end using $directory = trim($directory);

RE: trim function

2003-06-11 Thread Dan Muey
Hi all, say that $directory = C:\\directory\\*.* and I am trying to remove the *.* from the end using $directory = trim($directory); where trim is sub trim { my( $result) = @_; $result =~ s/^\s+(.*?)\s+$/$1/; Because . And * have special meanings in a regex.