Yes, that solves my problem. I could've looked at the hold day and would not have caught it. I guess a hash would be more efficient, but since that's not an issue for me at this time I'll stick with what I got. Thanks!
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of yitzle Sent: Wednesday, April 18, 2007 10:24 AM To: Johnson, Reginald (GTI) Cc: beginners@perl.org Subject: Re: Return value from subroutine > return = "Audit Volume"; You have return = "thingy"; You want return "thingy"; > if ($_ eq /AVI/) { > return = "Audit Volume"; > } > elsif (/BKP/) { > return = "BACKUP"; > } Can be shortened to: return "Audit Volume" if ( /^AVI$/ ); return "BACKUP" if ( /^BKP$/ ); (I wonder if " if(eq /AVI/)" would work...) You may want to consider setting up a hash and just accessing the element. (code untested) %lookup = { BKP => "BACKUP, AVI => "Audit Volume" }; Then replace the $temp_proc variable with $lookup {"AVI"} -------------------------------------------------------- If you are not an intended recipient of this e-mail, please notify the sender, delete it and do not read, act upon, print, disclose, copy, retain or redistribute it. Click here for important additional terms relating to this e-mail. http://www.ml.com/email_terms/ -------------------------------------------------------- -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/