Newsgroups: comp.lang.perl.misc
From: "Kristina Clair" <kcl...@soya.serve.com>
Date: Tue, 06 Nov 2001 12:36:09 -0500
Local: Tues, Nov 6 2001 12:36 pm
Subject: using a variable in a subroutine name
Hello,
I'm trying to use a variable in the name of a subroutine, like so: foreach my $x ("email_zip", "email_txt", "cp_zip", "cp_txt") { sub _send_email_zip { sub _send_email_txt{ etc... However, I'm getting the following error message: So, then I thought I could use the whole subroutine name in the foreach Does anyone know of a way to use a variable in the name of a subroutine? Thanks, You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||