SPUG: help with split

Brose, Eric eric.brose at attws.com
Thu Jun 7 19:01:45 CDT 2001


Hello,
 
I'd like to use the split function, but my delimeter is a decimal point and
split doesn't like that.
#!/usr/bin/perl
$s = "9.6";
(@here) = split(/./,$s);
print $here[1];
 
This above won't work, but if I use
 
#!/usr/bin/perl
$s = "9,6";
(@here) = split(/,/,$s);
print $here[1];
 
it works fine.  Can i have a quick workaround?
 
Thanks,
Eric
 
 

 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     POST TO: spug-list at pm.org       PROBLEMS: owner-spug-list at pm.org
      Subscriptions; Email to majordomo at pm.org:  ACTION  LIST  EMAIL
  Replace ACTION by subscribe or unsubscribe, EMAIL by your Email-address
 For daily traffic, use spug-list for LIST ;  for weekly, spug-list-digest
  Seattle Perl Users Group (SPUG) Home Page: http://www.halcyon.com/spug/





More information about the spug-list mailing list