merrymonk has asked for the wisdom of the Perl Monks concerning the following question:
$lcou = 0; while(defined($linein = <TXTIN>)) { $lcou += 1; @chr_array = split(//, $linein); $linein_tot = scalar(@chr_array); print "\nline count <$lcou> total chars <$linein_tot> line <$linei +n>\n"; for($j = 0; $j < $linein_tot; $j ++) { $chr = $chr_array[$j]; $chr_num = ord($chr); print "pos <$j> ascii <$chr_num> character <$chr>\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Windows and UNIX end of line characters
by ikegami (Patriarch) on Aug 10, 2010 at 17:09 UTC | |
|
Re: Windows and UNIX end of line characters
by Anonymous Monk on Aug 10, 2010 at 16:46 UTC | |
by merrymonk (Hermit) on Aug 10, 2010 at 19:15 UTC | |
by merrymonk (Hermit) on Aug 11, 2010 at 11:13 UTC | |
|
Re: Windows and UNIX end of line characters
by oko1 (Deacon) on Aug 10, 2010 at 18:32 UTC | |
by merrymonk (Hermit) on Aug 10, 2010 at 19:24 UTC | |
|
Re: Windows and UNIX end of line characters
by dasgar (Priest) on Aug 10, 2010 at 16:54 UTC | |
by merrymonk (Hermit) on Aug 10, 2010 at 19:19 UTC | |
by merrymonk (Hermit) on Aug 11, 2010 at 11:14 UTC |