Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: File::Monitor Question

by Anonymous Monk
on Jan 12, 2012 at 16:38 UTC ( [id://947579]=note: print w/replies, xml ) Need Help??


in reply to Re: File::Monitor Question
in thread File::Monitor Question

OK, I'm getting closer. I changed the line above of
print $file->name, " created\n";
to
print $file->files_created, " created\n";
and now it is printing the newly created file. Now I am having a problem getting the name of that file saved as a variable. I'm not experienced enough to understand how this thing works. I thought I could just do this:
$new_file = $file->files_created
But that doesn't work. How can I save that to a variable that I can work with?

Replies are listed 'Best First'.
Re^3: File::Monitor Question
by Anonymous Monk on Nov 18, 2015 at 16:37 UTC
    I used: my $file = @{$change->{delta}->{files_created}}[0]; and it worked. BR

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2024-03-19 05:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found