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
> "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/\./;
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 -
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
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/