my $binip = pack "c4", ($a, $b, $c, $d);
The previous line is this:
my ($a, $b, $c, $d) = split(/\./, $src_ip);
Which is the first line of a foreach loop:
foreach $src_ip (sort by_ip keys(%tgt_sys))
The script is set to dump STDERR to a log file. When this script runs, it seems to run fine, then the log fills up with this message:
Character in "c" format wrapped at /usr/local/shadow/SHADOW-1.8/find_scan.pl line 142, <STDIN> line 5507847.
Line 142 is where the first piece I posted; the line with the pack function in it. I did some checking into the pack function, but what I've learned so far about it doesn't seem to explain what is causing this message to be generated, and honestly, I'm not even sure exactly what it means. I figured out that line 5507847 is the last line of the file that is being streamed into the script, so I'm guessing that for some reason the 'pack' line isn't "handling" it correctly. My supervisor suggested it may be the presence of a newline, so I tried a chomp. But it didn't work; either I put it in the wrong place, or it wasn't the newline.
I need some help.
20040904 Edit by castaway: Changed title from ''pack' errors'
In reply to pack() gives me "character wrapped" warnings by Chris_LSU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |