Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re^3: Formatting an array

by roboticus (Chancellor)
on Feb 08, 2018 at 14:46 UTC ( #1208718=note: print w/replies, xml ) Need Help??


in reply to Re^2: Formatting an array
in thread Formatting an array

bartrad:

Assuming that all your path components are separated by "/", then you would simply use split again, and take the final component(s):

my @router_path_components = split qr{/}, $s_flds[0]; my $last_chunk = $router_path_components[-1];

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^4: Formatting an array
by bartrad (Sexton) on Feb 09, 2018 at 10:28 UTC

    Thank you

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (8)
As of 2018-09-26 10:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Eventually, "covfefe" will come to mean:













    Results (205 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!