tag:blogger.com,1999:blog-739580098595224395.post5372746431375455598..comments2023-10-28T08:35:36.315-07:00Comments on Last of the Careless Men: More respectableUnknownnoreply@blogger.comBlogger4125tag:blogger.com,1999:blog-739580098595224395.post-2098121370824057732009-06-22T07:07:44.891-07:002009-06-22T07:07:44.891-07:00Robin: Huh. For my purposes the program is always...Robin: Huh. For my purposes the program is always working on text files. As such, I'm not sure if binmode makes sense or not.SFhttps://www.blogger.com/profile/02815984722071185197noreply@blogger.comtag:blogger.com,1999:blog-739580098595224395.post-62448461128276932192009-06-22T07:04:09.695-07:002009-06-22T07:04:09.695-07:00autarch: Is there any real reason to prefer scalar...autarch: Is there any real reason to prefer scalar filehandles on something this simple? I pretty much always use IO::File for opening files in more complicated code, but would never think of it for something like this.<br /><br />Hmmm... never heard of three arg open before, but (google search) it seems to make sense. Mostly protecting against stuff I would never expect to actually see in practice, but with so little overhead, no harm in that.SFhttps://www.blogger.com/profile/02815984722071185197noreply@blogger.comtag:blogger.com,1999:blog-739580098595224395.post-49483534644214670142009-06-21T22:58:39.533-07:002009-06-21T22:58:39.533-07:00I would also suggest to set binmode on those fileh...I would also suggest to set binmode on those filehandles to make sure you don't change those files while copying.Robin Smidsrødhttps://www.blogger.com/profile/00814818213184105578noreply@blogger.comtag:blogger.com,1999:blog-739580098595224395.post-81286423744698545662009-06-20T16:31:38.237-07:002009-06-20T16:31:38.237-07:00Doh, use scalar filehandles, not globs! And use th...Doh, use scalar filehandles, not globs! And use three arg open, not two.<br /><br />open my $fh, '>', $file ...Anonymousnoreply@blogger.com