[Roma.pm] problema....

Christoph Wernli christoph at wernli.org
Sun Jan 7 05:15:24 PST 2007


On 1/7/07, LordOfDeath <webmaster.staff at gmail.com> wrote:

> Assumendo che sei su Unix, potresti fare qualcosa di questo genere:
>
> open (FILE, "tail -f $file |") or die $!;
>
> In alcuni casi potrebbe avere degli effetti indesiderati - vedi <
> http://www.sunsite.ualberta.ca/Documentation/Misc/perl-5.6.1/pod/perlopentut.html#pipe%20opens>
> per dettagli. Per leggere di logfile non ho mai avuto dei problemi, pero'.
>
> thx, ma quindi questa cosa farebbe leggere ogni riga del file in
> tempo-reale?
>

Si.

e posso mettere un timer per lo stop, no?
>

Certo, per esempio usando alarm - <
http://perldoc.perl.org/functions/alarm.html>

-c
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/roma/attachments/20070107/f9b5658f/attachment.html 


More information about the Roma mailing list