in reply to Re(2): Break continuous lines of a text file based on character lengths
in thread Break continuous lines of a text file based on character lengths

I wouldn't have immediately guessed that the -l switch would work because the POD for perlrun states that if a value is omitted from the -l switch, it sets $\ equal to $/. Since we're changing the value of $/ in the BEGIN{} block, and since the BEGIN{} block executes at least before the -p switch, I figured that using -l would set $\ to \104. Obviously that's not the case and I was just overthinking it.

Good call bart. Great one-liner!


Dave

  • Comment on Re: Re(2): Break continuous lines of a text file based on character lengths