in reply to Search and substitute into data structures

You're missing a close curly brace just before sub unwrap_hash. Or at least, I hope you are, because otherwise, you're trying to create nested subroutines, which definitely don't work in Perl (at least not how mortals expect them to work). You have oddly indented the next subroutines, making me wonder if you really do have those "inside" the other subroutine.

Have you seen Data::Visitor? I think it would abstract away most of what you're writing and rewriting, and let you concentrate on your transformations.


update: Yeah, you do have a broken subroutine-inside-a-subroutine. Please pull those out. Better yet, look at Data::Visitor.

Replies are listed 'Best First'.
Re^2: Search and substitute into data structures
by rbi (Monk) on Apr 30, 2007 at 18:55 UTC
    Sorry, I did not paste the last lines of the code.. I fixed it now.