Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

I can't get the sample code for File::Tail to read my file

by markseger (Beadle)
on Dec 21, 2011 at 19:28 UTC ( [id://944682]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    #!/usr/bin/perl -w
    
    ...
    while (defined($line=$file->read)) {
        print "$line";
    }
    
  2. or download this
    use File::Tail;
    $file=File::Tail->new("/tmp/xxx");
    ...
    $line=$file->read;
    print "after read\n";
    print "$line";
    
  3. or download this
    use File::Tail;
    $file=File::Tail->new(name=>"/tmp/xxx", debug=>99, interval=>1, maxint
    +erval=>1) or print "ERROR1: $!\n";
    ...
    $line=$file->read;
    print "after read\n";
    print "$line";
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://944682]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2024-04-18 02:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found