Syntax change in 5.12

R

Roland Mösl

Beyond the GUI problem and to find a
replacement for Win32::Shell::Execute,
I had an error message:

my $mask = $word;
$mask =~ y/0123456789/----------/;

The line with the regular expression
worked well in V5 built 522 from 1999.

Where is the problem?
 
D

D. Stussy

Roland Mösl said:
Beyond the GUI problem and to find a
replacement for Win32::Shell::Execute,
I had an error message:

my $mask = $word;
$mask =~ y/0123456789/----------/;

The line with the regular expression
worked well in V5 built 522 from 1999.

Where is the problem?

Your code, probably.

With Perl 5.12.0, it appears that certain constructs were tightened up to
be more strict. Code that ran without wanrings under 5.10 and earlier now
issue warnings.
 
D

Dr.Ruud

I had an error message:

my $mask = $word;
$mask =~ y/0123456789/----------/;

The line with the regular expression
worked well in V5 built 522 from 1999.

Where is the problem?

The first problems are that you don't mention the message,
and that you misspell transliteration.

Just shorten the series of hypens to a single one.

perl -MO=Deparse -we'
my $mask;
$mask =~ y/0123456789/----/;
'
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top