Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: regex syntax and idomatic Perl

by cbeckley (Curate)
on Mar 21, 2017 at 14:02 UTC ( [id://1185355]=note: print w/replies, xml ) Need Help??


in reply to Re: regex syntax and idomatic Perl
in thread regex syntax and idomatic Perl

Ah, that's very cool:

my $match = my ($fsys, $kb, $used, $avail, $cap, $mtd) = $df_output =~ m{\A (.+) \s+ (\d+) \s+ (\d+) \s+ (\d+) \s+ (\d+) % \s+ +(.+) \z}xms;

I didn't know match could be used in a list context like that. Chaining the scalar assignment is a nice touch.
Thank you.

Thanks,
cbeckley

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1185355]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (6)
As of 2024-03-28 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found