in reply to Re: pattern matching
in thread unitialized value error in pattern matching script

Er, hang on, the first argument to split is a regular expression - however it is quoted. Your snippet will split on any any character - and thus nothing will be assigned to $args1 and $args2. This can be demonstrated by the following :

#!/usr/bin/perl -w use strict; my $string = 'this is a test'; my @foo = split('(.)', $string); print join('*',@foo);
If you read the perlfunc entry for split you will see that using the '()' in the regular expression includes the delimiting character in the output substrings.

/J\