Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: search one instance

by d5e5 (Beadle)
on Nov 03, 2010 at 15:08 UTC ( [id://869255]=note: print w/replies, xml ) Need Help??


in reply to search one instance

I'm not sure I understand your question, but why not the following?
#!/usr/bin/perl use strict; use warnings; my $string = 'data' x 20; if ($string =~ m/data/) { print "Matching '$&'", "\n"; } print 'from $string which has value of ', "$string\n"; #Output: #Matching 'data' #from $string which has value of datadatadatadatadatadatadatadatadatad +atadatadatadatadatadatadatadatadatadatadata

Log In?
Username:
Password:

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

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

    No recent polls found