On Thu, 20 Feb 2003, Nick Tonkin wrote: > > >>In my logs when dumping a warn() I see this occasionally: > > >> > > >>192.168.0.24 at /home/wm/perl/WM/Auth/Access.pm line 28. > > >>192.168.0.24 at /home/wm/perl/WM/Auth/Access.pm line 28. > > >>192.168.0.24 at /home/wm/perl/WM/Auth/Access.pm line 28. > > >>192.168.0.24 at /home/wm/perl/WM/Auth/Access.pm line 28, <GEN1> line 245.
It's a perl feature. On warn's it'll add the filehandle and the line number when it's relevant. 5.6.1: $ ~perl/bin/perl -e 'warn "foo"; open F, ".bashrc"; warn "Foo" while <F>' 2>&1 | head -5 foo at -e line 1. Foo at -e line 1, <F> line 1. Foo at -e line 1, <F> line 2. Foo at -e line 1, <F> line 3. Foo at -e line 1, <F> line 4. If you set $/ so it's not reading normal lines it'll say chunk instead of line: $ ~perl/bin/perl -e 'warn "foo"; $/ = undef; open F, ".bashrc"; warn "Foo" while <F>' 2>&1 | head -5 foo at -e line 1. Foo at -e line 1, <F> chunk 1. Older perl's always said "chunk". perl 5.5.3: $ perl -e 'warn "foo"; open F, ".bashrc"; warn "Foo" while <F>' 2>&1 | head -5 foo at -e line 1. Foo at -e line 1, <F> chunk 1. Foo at -e line 1, <F> chunk 2. Foo at -e line 1, <F> chunk 3. Foo at -e line 1, <F> chunk 4. - ask -- ask bjoern hansen, http://www.askbjoernhansen.com/ !try; do();