Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: An imperfect pattern matcher writer

by Fletch (Bishop)
on Oct 03, 2001 at 03:01 UTC ( [id://116296]=note: print w/replies, xml ) Need Help??


in reply to An imperfect pattern matcher writer

You might consider replacing the multiple print statements with a heredoc or two. It'll cut down on the backwhacking you've got to do. Or use qq{} rather than ""'s for strings that need to be interpolated which include double quotes.

... print FILE_OUT <<'EOT'; $seq =~ /ZZZ/) { $match = $&; EOT print FILE_OUT qq{ \$name = "$name";\n}; print FILE_OUT <<'EOT'; $matchlength = length( $match ); $firstpos = index( $seq, $match ); print "$name, $match, $matchlength, $firstpos\n"; print "Got it!\n"; } elsif { EOT ...

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2024-04-20 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found