in reply to Read value from file, replace, then write to new file

Here's a nice little sub to generate a random string, if you want one:
sub random_string { local $" = ''; "@{[map{chr(97+int rand 26)} 1 .. shift]}"; }


Nobody says perl looks like line-noise any more
kids today don't know what line-noise IS ...

Replies are listed 'Best First'.
Re^2: Read value from file, replace, then write to new file
by ikegami (Patriarch) on Dec 23, 2007 at 21:19 UTC

    local $" = ''; "@{[ ... ]}"
    instead of
    join '', ...?

    sub random_string { join '', map{chr(97+int rand 26)} 1 .. shift; }