in reply to Re^4: Hash of Arrays and File Operations
in thread Hash of Arrays and File Operations

I have tried the above syntax and it doesn't seem to be working.

  • Comment on Re^5: Hash of Arrays and File Operations

Replies are listed 'Best First'.
Re^6: Hash of Arrays and File Operations
by Anonymous Monk on Jan 28, 2010 at 22:56 UTC
    You may think you have, but you made a mistake :) Show your code and I'll tell you where
    #!/usr/bin/perl -- use strict; use warnings; use Data::Dumper; my @cols = ( 12, 12, 12 ); print Dumper( \@cols ),"\n"; tr/12/91/ for @cols[1.. $#cols]; print Dumper( \@cols ),"\n"; __END__ $VAR1 = [ 12, 12, 12 ]; $VAR1 = [ 12, '91', '91' ];

      Thanks a lot. Yeah I works and I was wrong. :) I was trying to do the following:

      @cols = tr/12/01/ for @cols[0 .. $#cols]