Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Store data into array by looping?

by FreeBeerReekingMonk (Deacon)
on Apr 10, 2019 at 22:08 UTC ( [id://1232426]=note: print w/replies, xml ) Need Help??


in reply to Store data into array by looping?

Replying on the UPDATE (you really should create a new question, as older questions get ignored in favour of new questions).

Just capture nand2_1 into a variable, like you already did, and then just break it into bits, like so:

my $gate_name = 'nand2_1'; my ($gtype, $gfirst, $gsecond) = ($gate_name =~ /^(\w+)(\d+)_(\d+)/); print "# $gtype # $gfirst # $gsecond #\n";

output:

# nand # 2 # 1 #

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-25 13:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found