Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Regular expression to list all files of type in folder

by ww (Bishop)
on Dec 05, 2012 at 22:16 UTC ( #1007417=note: print w/ replies, xml ) Need Help??


in reply to Re: Regular expression to list all files of type in folder
in thread Regular expression to list all files of type in folder

UPDATE: I addressed my answer to the wrong node. 2teez initial node was modified after runrig pointed out the open issue. So please read this as if addressed, as intended, to 2teez. </UPDATE>
It's highly impolite to modify your (mistaken) post without acknowledging the update.

<UPDATE3 with strikeout in light of the reply, ack'ing that the sequence he asserts might have coincided nearly simultaneously with what I saw.> It's even more so when you ADD a suggestion made by another Monk that was not included in your own original, inaccurate (and apparently, untested) advice. <RESUMING UPDATE3 NOTE: I continue to held the view that "your own original, inaccurate (and apparently, untested) advice...." was ill-considered.</RESUMING...>

- -, and dog votes be damned.

P.S. (and yes, this is an update, too) It's also wise to test your code (and that to which you're responding) to make sure yours
    a) does what you thought it should do...
        and
    b) that your solution actually solves or illuminates OP's problem.


Comment on Re^2: Regular expression to list all files of type in folder
Download Code
Re^3: Regular expression to list all files of type in folder
by 2teez (Priest) on Dec 06, 2012 at 01:57 UTC

    Hi ww,
    I cannot be more surprise than anything else than your comment, as regard my initial OP. After I came to this thread.
    Indeed had posted a solution, which stated as this Use this: next unless ($file =~ m/.+?\.jpg$/);
    then added this: Please, always check the return of your open function like so: open ... or die "can't open file: $!"; or use autodie
    Only for me to go back into the "thread" to see that runrig had posted this:...Also, unless you're using autodie, you should check the status of open and opendir.

    On my honor, I didn't update my regex used in my initial OP, neither did I updated my post after seeing runrig post.
    Probably, the only mistake I made was not to have put a word out that I wasn't updating my post after seeing that of runrig.
    Infact, to prove that, why was opendir not included in my "update"? If I had seen that of runrig before writing mine.

    Please, if you may, check my other post before now. I had shown Update, when my initial post had been updated. Acknowledged, when the original thought was not mine, been grateful with an update of the monks name when I was corrected on some post.
    I feel so hurt here, because I had been called a "thief" but in a polite way.
    I believe your assessment of what went down here is WRONG, please.

    Update:
    Sorry, I didn't include this: Except for changing the usage of "Use this" to "try this:" I didn't update anything else.
    And I did that because I felt that using "Use this", was not polite enough.
    And if I had wanted to lie about this, I would not be including this.

    If you tell me, I'll forget.
    If you show me, I'll remember.
    if you involve me, I'll understand.
    --- Author unknown to me

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (12)
As of 2014-07-11 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (218 votes), past polls