Domain Name Forum

Domain Name Forum (http://www.domainnameforum.org/index.php)
-   Perl (http://www.domainnameforum.org/forumdisplay.php?f=129)
-   -   skip leading space problem (http://www.domainnameforum.org/showthread.php?t=148482)

webdev 03-11-2011 07:03 AM

skip leading space problem
 
Hi, I have encounter a strange result couldn't figured out. # Str with format "Mon MM HH", try to skip leading space in DD. my $str = "Jan 8 11"; # Jan, 8th 11 o'clock print substr($Str, 0,3) . *substr($Str, 4,2)=~s/^\s+// *. substr($Str, 7,2) . "\n"; The result is "Jan11", I expect...


All times are GMT -4. The time now is 02:44 AM.

Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.