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

Re: finding the position of a particular character in a string

by NetWallah (Abbot)
on Oct 06, 2011 at 04:59 UTC ( #929933=note: print w/ replies, xml ) Need Help??


in reply to finding the position of a particular character in a string

>perl -e "my $a=q|THE FOOD IS DELICIOUS|;for(my $x=-1;($x=index($a,qq| +O|,$x+1))>=0;){print qq|$x\n|}" 5 6 18

            "XML is like violence: if it doesn't solve your problem, use more."


Comment on Re: finding the position of a particular character in a string
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (15)
As of 2015-07-02 13:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (40 votes), past polls