in reply to Re^5: foreach type of deal?
in thread foreach type of deal?

Wow, I'm thinking I have a lot to learn. I was with you until the in, out deal. I never even considered that I had to use something like that. You're right, I shouldn't have been thinking about making a change to the original copy.

I tried the code, and it works, but it will only work if I comment out use strict mode. Otherwise, I'm getting errors on declarations. I'm currently trying to figure out how to declare this code correctly. As I said, the code works like a charm, but I want to see if I can at least get the declarations correct. :/.

I learned a few things with this, but I wouldn't have come close to figuring this out without you guys. Thanks!

Replies are listed 'Best First'.
Re^7: foreach type of deal?
by huck (Prior) on Mar 15, 2017 at 21:50 UTC

    ug... will "too early in the morning" work at 4pm?

    while( my $line = <$in> ) { $line = substr($line,1); print $out $line; }

      I got it!!! The error was coming from:

      close $in

      close $out

      They were outside of the block! :D. Now the whole thing works flawlessly. Thanks again for everything!