stupid perl question

M

M.N.A.Smadi

hi guys;

sorry for sending a perl question here, but python guy "HAD TO" look at
perl code;

how can i split a string that contains white spaces and '_'

any clue?

thanks
moe smadi
 
J

John Machin

hi guys;

sorry for sending a perl question here, but python guy "HAD TO" look at
perl code;

how can i split a string that contains white spaces and '_'

any clue?

thanks
moe smadi

Well the screamingly obvious way to do in Python what I think your
imprecise question is asking is:
>>> "foo_bar zot plugh _ xyzzy".replace("_", " ").split() ['foo', 'bar', 'zot', 'plugh', 'xyzzy']
>>>

Talking about screaming, I fled screaming from perl at about the perl 3
stage -- I can't help you any further; I don't want to turn into a
pillar of salt.

Why don't you ask stupid perl questions on comp.lang.perl??

Cheers,
John
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top