develooper Front page | perl.perl6.users | Postings from September 2017

chaining substitutions?

Thread Next
From:
ToddAndMargo
Date:
September 23, 2017 05:29
Subject:
chaining substitutions?
Message ID:
d488182c-fbdd-c123-c81b-4bd02ab49dda@zoho.com
Hi All,

Question.  Can I chain these two substitutions together?

$ perl6 -e 'my $x="    State : abc     "; $x ~~ s/.*?" : "//; $x ~~ s/" 
".*//; say "<$x>";'

<abc>

Many thanks,
-T

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About