Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Variable not set properly in perl

by Anonymous Monk
on Sep 28, 2014 at 19:55 UTC ( [id://1102285]=note: print w/replies, xml ) Need Help??


in reply to Variable not set properly in perl

Store the .subckt blocks in a hash:

my %subckt; my $name; my $want; while (<DATA>) { if (my $ff = /\.subckt\s+(\w+)/ .. /\.ends/) { $name = $1 if $ff == 1; $subckt{$name} .= $_; } else { $want = $1 if /^\s*xa1\b.*\b(\w+)\s*$/; } } print $subckt{$want};

Log In?
Username:
Password:

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

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

    No recent polls found