Re: search replace saved to a variable

2009-09-03 Thread Jenda Krynicky
From: Noah Garrett Wallach > okay a step further - is there a way to make the following a one liner? > > (my $filename_cmd = $cmd[-1]) =~ s/\|//g; > $filename_cmd =~ s/\s+/\./g; > $filename_cmd =~ s/save.*//g; There's no point in making it a one liner. Plus anything may be writen

Re: search replace saved to a variable

2009-09-02 Thread Uri Guttman
> "NGW" == Noah Garrett Wallach writes: NGW> Jim Gibson wrote: >> At 7:22 PM -0700 9/2/09, Noah Garrett Wallach wrote: >>> Hi there, >>> >>> what is the way to collapse this search/replace to one line? >>> >>> my $filename_cmd = $cmd[-1]; >>> my $filename_cmd =~ s/\s/\./;

Re: search replace saved to a variable

2009-09-02 Thread Noah Garrett Wallach
Jim Gibson wrote: At 7:22 PM -0700 9/2/09, Noah Garrett Wallach wrote: Hi there, what is the way to collapse this search/replace to one line? my $filename_cmd = $cmd[-1]; my $filename_cmd =~ s/\s/\./; (my $filename_cmd = $cmd[-1]) =~ s/\s/\./; thanks, okay a step further -

Re: search replace saved to a variable

2009-09-02 Thread Jim Gibson
At 7:22 PM -0700 9/2/09, Noah Garrett Wallach wrote: Hi there, what is the way to collapse this search/replace to one line? my $filename_cmd = $cmd[-1]; my $filename_cmd =~ s/\s/\./; (my $filename_cmd = $cmd[-1]) =~ s/\s/\./; -- Jim Gibson jimsgib...@gmail.com -- To unsubscribe

search replace saved to a variable

2009-09-02 Thread Noah Garrett Wallach
Hi there, what is the way to collapse this search/replace to one line? my $filename_cmd = $cmd[-1]; my $filename_cmd =~ s/\s/\./; Cheers, Noah -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/