Cool. Dex Marcos Lorenzo de Santiago wrote:
> On Tue, 14 May 2002, Dexter Casey wrote: > > > Dude that doesn't work. You are substituing white space for the word you are >trying to > > match and store in $server. Am I missing something. That just returns the >count of > > matches. > > > > Rgds > > Dexter > > I tried it and it did work! > > C:\>perl -e "$line="\\\\Server\\Pathname";print >"$line\n";($server=$line)=~s/\\\w*$//; print "$server\n"" > \\Server\Pathname > \\Server > > C:\> > > what it does is first assign $line to $server ($server=$line) and then > replace in $server one '\' (not two!) and a word (\w* means none or more > alphanumeric characters) until the end of the line ($ is end of line) with > nothing (//), I mean delete the '\whatever_is_here_until_end_of_line'. > > rgrds, > m4c. _______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
