CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [G_Ranger] Regex search and replace: Edit Log



FishMonger
Veteran / Moderator

Jul 3, 2016, 8:27 AM


Views: 4666
Re: [G_Ranger] Regex search and replace

You can't use the same variable for the filehandle that you used to store the filename.

Change that line to this:

Code
open my $out_fh, ">:encoding(utf-8)", $out_file or die "unable to open $out_file for writing! <$!>";


You'll also need to update the other lines that use that filehandle.


(This post was edited by FishMonger on Jul 3, 2016, 8:28 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Jul 3, 2016, 8:28 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives