Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^3: file listing within skript not working

by vinoth.ree (Monsignor)
on Jan 30, 2013 at 11:42 UTC ( #1016041=note: print w/replies, xml ) Need Help??


in reply to Re^2: file listing within skript not working
in thread file listing within skript not working

Well said moritz ++

McSvenster Perl has many ways to do things,you can also use readdir() function this way,

use strict; use warnings; use Data::Dumper; opendir (DIR, "/home/vinoth/"); my @files = grep /\.xml$/, readdir DIR; print Dumper \@files;

I am not telling this is the best way, but its also one of the way.

Replies are listed 'Best First'.
Re^4: file listing within skript not working
by McSvenster (Novice) on Jan 30, 2013 at 11:59 UTC

    It's getting more and more confusing for me...

    But maybe I found the critical point: When I use the backticks perl writes to the logfile until the program comes to the line with the backticks. But when I use "glob" instead, perl executes the whole program before it performs any file-writing.

    Is this right? And more important: Can you explain it to me? (you see, I am a beginner...)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1016041]
help
Chatterbox?
[erix]: Hatshepsut (no sneezing audio there)
choroba wipes the saliva from the cookies
[LanX]: scary Le Pen + Melonchon had over 40% ...
[vrk]: One good word for it in Finnish is pärskäys. A very wet connotation.
[Eily]: somehow when googling pärskäys I got a pageful of Finnish :P
[robby_dobby]: Can I go participate in an YAPC?
[Eily]: (I was trying to find a translation but google translate didn't help)
robby_dobby is not entirely serious
[LanX]: ... thank God France doesn't have an electoral college...
[Eily]: LanX, let's hope it gets better for the second turn

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (10)
As of 2017-04-24 15:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (442 votes). Check out past polls.