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

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

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

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:

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