Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: How can i debug compound map/grep statements just using print?

by karlgoethebier (Abbot)
on Dec 01, 2012 at 19:29 UTC ( [id://1006630]=note: print w/replies, xml ) Need Help??


in reply to Re: How can i debug compound map/grep statements just using print?
in thread How can i debug compound map/grep statements just using print?

You answered: "please, next time post clear questions with isolated code examples.

My question was: "How can i debug compound map/grep statements just using print?"...and in my code you can read this:

map { ( $_->stat )[9] } # e.g i'm interested in this... grep { $_->name =~ /.+\.$suffix$/ } # ...and this

How clear can we get ;-)

You answered: "you can use print anywhere within these blocks as long as it doesn't change the returned value."

This is what i was searching for! Honestly said: i didn't know this. And perhaps i've got yet another mental block. Thank you very much for this advice.

Best regards, Karl

«The Crux of the Biscuit is the Apostrophe»

Replies are listed 'Best First'.
Re^3: How can i debug compound map/grep statements just using print?
by LanX (Saint) on Dec 01, 2012 at 19:36 UTC
    Well you posted more than 10 times more code than necessary.

    I said "with isolated code examples." =)

    Take your new terse explanation as a standard for your coming posts. ;)

    Cheers Rolf

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^3: How can i debug compound map/grep statements just using print?
by space_monk (Chaplain) on Dec 02, 2012 at 09:02 UTC

    Your response did get a smile out of me, but the only part of the code that was necessary to show your problem is the find subroutine. All the POD and getoptions code you added are no doubt necessary for a complete program, but not to show the problem you are having

    A Monk aims to give answers to those who have none, and to learn from those who know more.

      Yes, thats right. Sorry. Regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

Log In?
Username:
Password:

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

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

    No recent polls found