I don't see what I'm doing wrong here. I just want to compare the value of $_ and return the indicated string if there is a match. #!/usr/bin/perl use strict; use warnings; my $temp_proc; my $mnt_proc = "AVI"; $temp_proc = convert_mnt_proc($mnt_proc);
#*********************************************************************** ******************* sub convert_mnt_proc { $_ = shift; if ($_ eq /AVI/) { return = "Audit Volume"; } # elsif (/BKP/) { # return = "BACKUP"; # } # elsif (/DBB/) { # return = "Database Backup"; # } # elsif (/RCL/) { # return = "Reclamation"; # } # elsif (/BSP/) { # return = "Backup Storage Pool"; # } # elsif (/MIG/) { # return = "Migration"; # } # elsif (/MDT/) { # return = "Move Data"; # } # elsif (/IMP/) { # return = "Import Node"; # } } #end convert_ Can't modify return in scalar assignment at fixit.pl line 12, near ""Audit Volume";" Execution of fixit.pl aborted due to compilation errors. -------------------------------------------------------- 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/ --------------------------------------------------------