leon Saviski ([EMAIL PROTECTED]):

> hi

> i am trying to write script that would allow create hash  from input that
> consists of multiple white spaces. User enters first middle last name  like
> "John Morton Downey".
> part of the code:
> while() {
>       print "enter your first middle last name";
>       chomp($in=<STDIN>);
>       if ($in ne '') {
>              ($fn,$mn,$ln) = split ('',$in);
> # at this point I am stuck. As true, it retrieves only first and middle
> names. I don't want to use substitution option. How to use split on multiple
> white spaces?
> Any hints? 
> LeN


How about: () = split /\s+/, $in;



-- 

Jeremy Wadsack
Wadsack-Allen Digital Group

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl

Reply via email to