Terry, Try this:
($mytempvar) = $linetoprobe =~ m/(.)...$/; Putting $mytempvar in the () assigns it the character in the () in the regular expression match where a "." will match any character. Matt Schneider Programmer/System Administrator SKLD Information Services, LLC ($mytempvar) = -----Original Message----- From: Terry Vaughn [mailto:tvaughn@;dakotagrowers.com] Sent: Tuesday, November 12, 2002 2:11 PM To: [EMAIL PROTECTED] Subject: [Perl-unix-users] regexp Q Hello all. $linetoprobe = "XXXXYYY~ZZZ" ; How Do I assign $mytempvar the character immediately prior to "ZZZ" using reg exp?? Terry _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs