[Israel.pm] Replace with Variable content

ik idokan at gmail.com
Wed Oct 12 04:47:29 PDT 2005


Hello,

I would like to do the following:

....
use strict;
....
my $allowedChars = "a-zA-Z\x{50D}";

$line =~ s/[^$allowedChars]//gs;

Now as you can see, this code will not be allowed to be used. So my
question is how can I do something in this idea ?

I wish to have one "place" that I define what I allow, that may be
changed at any given time, so instead going over my entire code over
and over again, I would like to have the ability to use a "constant"
like idea...

Thank you for any help, or RTFM (that I could not find) on this matter.

And Gmar Hatima Tova and Tzum Kal,


Ido




More information about the Perl mailing list