in reply to Tie::File Help

Slashes? I see you use backslashes in the good code, and forward slashes in the bad.

Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

Don't fool yourself.

Replies are listed 'Best First'.
Re^2: Tie::File Help
by Anonymous Monk on Apr 27, 2005 at 13:22 UTC
    actually It tried it this way (line4):
    my $file='T:\temp\temp.txt';
    and this way:
    my $file="T:\\temp\\temp.txt";
    (with the double quote the initial backslash has to be escaped lest a \t tab be interpreted)
    anyway.... both brought down the same error. also tried
    tie my @lines, 'Tie::File', $file or die 'tie failed';
    ...and...
    tie my @lines, 'Tie::File', "$file" or die 'tie failed';
    to no avail..... (same error)
      Another guess: in the first working example, you use file "T:\temp.txt", while in the not-working one you use "T:\temp\temp.txt". Are you sure that directory "T:\temp" exists in drive T, and you have the rights to write it?!?

      Flavio (perl -e 'print(scalar(reverse("\nti.xittelop\@oivalf")))')

      Don't fool yourself.