Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^3: how to split the string into two or three numbers based on certain value.

by choroba (Bishop)
on Feb 12, 2013 at 09:15 UTC ( #1018318=note: print w/replies, xml ) Need Help??


in reply to Re^2: how to split the string into two or three numbers based on certain value.
in thread how to split the string into two or three numbers based on certain value.

Except for cases where you will not. Try 9049589370.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
  • Comment on Re^3: how to split the string into two or three numbers based on certain value.

Replies are listed 'Best First'.
Re^4: how to split the string into two or three numbers based on certain value.
by 7stud (Deacon) on Feb 12, 2013 at 18:56 UTC
    Ah yes. The string '0' is considered false in perl despite having a length of 1. So if $str = '0', then $str will be considered false in a boolean context where length($str) will be 1 and evaluate to true.

    I wonder what the op wants to output for the string '0'? Also, I wonder what the output should be for the string '0123'?

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018318]
help
Chatterbox?
[Corion]: :-D
Corion discovers a new shiny toy to try out over the (longish) weekend. Since I've done some more with websockets, maybe I'll try writing a webserver that implements hot-reloading of HTML(+CSS, +Javascript) in the browser. Edit the local file and ...
[Corion]: ... the browser(s) get a ping to a) refresh the page or b) reload "just" the changed parts, keeping the scroll position etc.
[Corion]: But I also have to look at how I can make WWW::Mechanize:: RemoteBrowser a reality, and how to make it safe from malicious content ;)
[Corion]: Part of wanting hot-reloading is that I think I've stumbled on a very simple set of CSS that I maybe want to use for a blog, but I want to try that out on mobile too, and I also want to add/modify it slightly so it has a header too...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2018-04-26 10:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Notices?