Mangesh Paranjape wrote:
> Forwarded on behalf of Moshe:
> 
> I would like to know if this is OK?
> 
> @array = split(/(--|;)/,$var);
> 
> I would like to split on either a double dash or a semi colon with one 
> split using ( | ).
> 
> Is that viable, or do I have to test for either one, and split accordingly.

To Moshe and other newbie posters:

This is kind of a silly question.  Why ?  Because it would take but 2-3
minutes to test the premise instead of waiting for hours for a list response.

You need to take a little initiative and test these things on your own.
Plus you'll learn more by a little trial and error and save a lot of bandwidth.

Try your code above and use Data:Dumper (or just print the @array in quotes)
to determine what results you got.

Everyone posting to the list should weigh the time involved to test something
against the amount of time for thousands of list members to read/delete your
message.  I've never posted to the list for core Perl help and never had a
Perl class, but somehow I manage to write Perl programs that get the job done.
Sometimes it can take hours to work out a problem and you have to at least
make the effort before asking for help.

If you've already tested several ways and are still stumped, then by all means
ask the list for help - that's what it's there for.  I don't think it's there
to do your learning/testing for you though - we all need to do a lot of that
on our own to become proficient.

Also consider the Perl beginners list at Yahoo groups until you get comfortable
with Perl.
-- 
   ,-/-  __      _  _         $Bill Luebkert   ICQ=162126130
  (_/   /  )    // //       DBE Collectibles   Mailto:[EMAIL PROTECTED]
   / ) /--<  o // //      http://dbecoll.tripod.com/ (Free site for Perl)
-/-' /___/_<_</_</_     Castle of Medieval Myth & Magic http://www.todbe.com/

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to