in reply to Re^2: search and replace strings in different files in a directory (Path::Tiny)
in thread search and replace strings in different files in a directory

Does this help clear it up?

#!/usr/bin/perl -- use strict; use warnings; use Data::Dump qw/ dd /; Main( @ARGV ); exit( 0 ); sub Main { dd( -argv, \@ARGV ); for my $ar ( @ARGV ){ Sky( $ar ); } Sky(6); } sub Sky { my( $ra ) = @_; dd( -ra, $ra ); dd( -args, \@_ ); } __END__ $ perl sky ("-argv", []) ("-ra", 6) ("-args", [6]) $ perl sky a b c ("-argv", ["a", "b", "c"]) ("-ra", "a") ("-args", ["a"]) ("-ra", "b") ("-args", ["b"]) ("-ra", "c") ("-args", ["c"]) ("-ra", 6) ("-args", [6])
  • Comment on Re^3: search and replace strings in different files in a directory (Path::Tiny)
  • Download Code

Replies are listed 'Best First'.
Re^4: search and replace strings in different files in a directory (Path::Tiny)
by PitifulProgrammer (Acolyte) on Aug 19, 2014 at 13:51 UTC

    Thanks a mil for providing this code. I appreciate your help, but this complicates matters, I cannot make heads nor tails of this.

    It is a bit too cryptic for a beginner like me who has not yet grasped some basic concepts.

    Would you mind providing some explanatory sentences and establish a link to my recent problem?

    I might learn faster if provided with some practical examples

    I surely will have another go at your code and try to figure what you would like to teach me.

    Thanks a mil for taking the trouble explaining this matter.

    Kind regards

    C.

        Hi there

        Thanks a mil for providing the links and topics. That was exactly what I was looking for. Like I said, I have not yet touched the subroutines topic in the books I have.

        I will read the relevant chapters and write lines explaining the code that was provided here. I will also post the results to get your opinion on my findings. It might take a while though...

        Thanks a mil for sharing the links.

        Kind regards and take care

        C.