[ABE.pm] Append a line at bottom of file

Ricardo SIGNES rjbs-perl-abe at lists.manxome.org
Thu Mar 11 13:54:30 CST 2004


* Phil R Lawrence <phil at five-lawrences.com> [2004-03-11T14:52:39]
> 
> I tried using eof() in a one-liner (i.e with -pi -e), but did strange 
> things.  Then I saw in the Camel that eof "is not useful in an 
> interactive context" (for reasons that are beyond me).
> 
> So I guess you're stuck with boring temp files and such.

Nah, you could Tie::File the file.  

Something like:
  push @file, "EXIT;" if $file[-1] ne "EXIT;";

-- 
rjbs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.pm.org/pipermail/abe-pm/attachments/20040311/bd0af3a6/attachment.bin


More information about the ABE-pm mailing list