The stupid question is the question not asked | |
PerlMonks |
Re^2: difference in regexby ovedpo15 (Pilgrim) |
on May 29, 2018 at 14:11 UTC ( [id://1215377]=note: print w/replies, xml ) | Need Help?? |
Thank you for the replay! As I mentioned on one of the posts on this thread - I would like to split it somehow into two scalars. I can use my ($a,$b) = ($row=~ /(.*),(.*)/); But if $row doesn't have commas it won't work. how do I make always put a string into $path for example: if "abc" it will be $path = "abc" and $value is undefined. if "abc,5" it will be $path = "abc" and $value = 5 if "a,b,c,5" it will be $path = "a,b,c" and $value = 5
In Section
Seekers of Perl Wisdom
|
|