cgmd has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to initialize a variable to the transliterated scalar value of another variable. I'm unable to make the following work:
#!/usr/bin/perl/ -w use strict; open UDATA, '<', "todo.users" or die "Failed to open userdata... $!"; while (my $line = <UDATA>) { chomp $line; my $nuline =~ tr/a-zA-Z/n-za-mN-ZA-M/; print "$nuline\n"; } close UDATA;
Why does this not print the transliterated value of $line?
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem using transliteration to modify a variable...
by FunkyMonk (Bishop) on Jul 04, 2007 at 19:31 UTC | |
|
Re: Problem using transliteration to modify a variable...
by blazar (Canon) on Jul 04, 2007 at 20:00 UTC | |
|
Re: Problem using transliteration to modify a variable...
by GrandFather (Saint) on Jul 04, 2007 at 20:55 UTC | |
by cgmd (Beadle) on Jul 10, 2007 at 00:39 UTC | |
by GrandFather (Saint) on Jul 10, 2007 at 01:41 UTC | |
by cgmd (Beadle) on Jul 10, 2007 at 02:01 UTC | |
|
Re: Problem using transliteration to modify a variable...
by cgmd (Beadle) on Jul 04, 2007 at 20:39 UTC |