Re: trouble with 'tr' command

2009-01-06 Thread Tony Esposito
I tried $foo =~ s/,/$field_term/g; and it worked fine ... thx. From: John W. Krahn To: Perl Beginners Sent: Tuesday, 6 January, 2009 13:19:20 Subject: Re: trouble with 'tr' command Tony Esposito wrote: > Hello, Hello, > Trying to do the f

Re: trouble with 'tr' command

2009-01-06 Thread John W. Krahn
Tony Esposito wrote: Hello, Hello, Trying to do the following and the variable $field_term does not transiterate. The $foo becomes "name$age$grade$school$semester". #!/usr/bin/perl my $field_term = '|'; my $foo = "name,age,grade,school,semester"; $foo =~ tr/,/$field_term/; __END__

trouble with 'tr' command

2009-01-06 Thread Tony Esposito
Hello, Trying to do the following and the variable $field_term does not transiterate.  The $foo becomes "name$age$grade$school$semester". #!/usr/bin/perl my $field_term = '|'; my $foo = "name,age,grade,school,semester"; $foo =~ tr/,/$field_term/;  __END__ Please advise.