[25566] in Perl-Users-Digest
Perl-Users Digest, Issue: 7810 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 22 00:15:25 2005
Date: Mon, 21 Feb 2005 21:15:17 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Mon, 21 Feb 2005 Volume: 10 Number: 7810
Today's topics:
format and print to array (justme)
Re: format and print to array <ebohlman@omsdev.com>
Re: How should I interpret this set of laptop specifica <jazeker_b_nospamlalala@yahoo.co.uk>
Re: Intercepting data flow between 2 apps (Jay Tilton)
IO::Handle blocking error? <junk@blackwater-pacific.com>
Web Application Installation Script <senthil.ganesan@gmail.com>
Re: Why aren't 'warnings' on by default? nospam@geniegate.com
Re: Write-Only Socket <1usa@llenroc.ude.invalid>
Re: Write-Only Socket <news@chaos-net.de>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 21 Feb 2005 17:48:08 -0800
From: eight02645999@yahoo.com (justme)
Subject: format and print to array
Message-Id: <c0837966.0502211748.4c210f59@posting.google.com>
hi
i am studying how to format a report using "format" and was wondering,
can we format it to a variable or an array instead?
say to format to a file, we can specify a filehandle.
open(FILE, ">> $file) or die ......
format FILE=
@<<<< blah blah
.
write FILE
but what if i want to print to an array instead of a file?
thanks
------------------------------
Date: 22 Feb 2005 03:15:06 GMT
From: Eric Bohlman <ebohlman@omsdev.com>
Subject: Re: format and print to array
Message-Id: <Xns9604D97E9C314ebohlmanomsdevcom@130.133.1.4>
eight02645999@yahoo.com (justme) wrote in news:c0837966.0502211748.4c210f59
@posting.google.com:
> i am studying how to format a report using "format" and was wondering,
> can we format it to a variable or an array instead?
>
> say to format to a file, we can specify a filehandle.
>
> open(FILE, ">> $file) or die ......
> format FILE=
> @<<<< blah blah
> .
> write FILE
>
> but what if i want to print to an array instead of a file?
perldoc perlform, specifically the "Accessing Formatting Internals" part.
------------------------------
Date: Tue, 22 Feb 2005 00:04:33 GMT
From: Jazeker <jazeker_b_nospamlalala@yahoo.co.uk>
Subject: Re: How should I interpret this set of laptop specifications?
Message-Id: <lGuSd.17780$Nr4.1545403@phobos.telenet-ops.be>
Francis Chee wrote:
> Hi, there:
>
> This is not C++, but I think it will get some quick response for my Laptop
> decision.
>
> I expect my notebook doesn't inhibit me from editing digital pictures due to
> LCD displays.
> What does the "Maximum Resolution1024x768" and "Max resolution (with max
> video
> RAM)2048x1536" mean?
>
> If I order this machine with RAM upgraded to 512MB, will I get a resolution
> of 2048x1536
> anyway?
>
> Thanks.
You will need a 1200x635 screen to see all web formats approved by
Microsoft. With such screen you can use the DVD::Play module which
allows you to watch cinema-sized movies without a projector.
oh yes... and do ask for the soundblaster 16 ASP.
--
print <<EOF;
Just a noobish Perl hacker
EOF
------------------------------
Date: Tue, 22 Feb 2005 01:02:32 GMT
From: tiltonj@erols.com (Jay Tilton)
Subject: Re: Intercepting data flow between 2 apps
Message-Id: <421a7dbb.7617092@news.erols.com>
Richard Anderson <hackeras@gmail.com> wrote:
[A long, meandering tale of firewalls.]
You have completely missed the point people were trying to make in the
other thread: you have not yet asked a perl question.
Once again: You have not yet asked a perl question.
A third time, because you seem terminally obtuse:
YOU HAVE NOT YET ASKED A PERL QUESTION.
After you have used the packet sniffer to intercept the IP traffic,
after you have analyzed the traffic to see what information is sent,
after you have determined how to craft your bogus information to send in
its place,
_then_ you might be ready to do some programming.
Until then, this is completely off-topic to clpm.
------------------------------
Date: Mon, 21 Feb 2005 19:34:51 -0800
From: Steve May <junk@blackwater-pacific.com>
Subject: IO::Handle blocking error?
Message-Id: <111l9eicg2t07d1@corp.supernews.com>
Trying to get Net::SSH::Perl working and receiving this message:
Can't locate object method "blocking" via package "IO::Handle" at
/usr/local/lib/perl5/site_perl/5.8.6/Net/SSH/Perl.pm line 212,
IO::Handle will not install, even if forced
cpan> force install IO::Handle
Running install for module IO::Handle
Running make for G/GB/GBARR/IO-1.20.tar.gz
CPAN: LWP::UserAgent loaded ok
Fetching with LWP:
ftp://cpan.cs.utah.edu/pub/CPAN/authors/id/G/GB/GBARR/IO-1.20.tar.gz
Checksum for
/usr/local/share/.cpan/sources/authors/id/G/GB/GBARR/IO-1.20.tar.gz ok
IO-1.20/
IO-1.20/t/
IO-1.20/t/io_unix.t
IO-1.20/t/io_sel.t
IO-1.20/t/io_const.t
IO-1.20/t/io_udp.t
IO-1.20/t/io_dup.t
IO-1.20/t/io_xs.t
IO-1.20/t/io_pipe.t
IO-1.20/t/io_sock.t
IO-1.20/t/io_tell.t
IO-1.20/t/io_poll.t
IO-1.20/t/io_multihomed.t
IO-1.20/t/io_dir.t
IO-1.20/IO/
IO-1.20/IO/Pipe.pm
IO-1.20/IO/Poll.pm
IO-1.20/IO/Seekable.pm
IO-1.20/IO/Socket/
IO-1.20/IO/Socket/UNIX.pm
IO-1.20/IO/Socket/INET.pm
IO-1.20/IO/Dir.pm
IO-1.20/IO/File.pm
IO-1.20/IO/Select.pm
IO-1.20/IO/Socket.pm
IO-1.20/IO/Handle.pm
IO-1.20/IO.pm
IO-1.20/poll.c
IO-1.20/Makefile.PL
IO-1.20/ChangeLog
IO-1.20/poll.h
IO-1.20/README
IO-1.20/IO.xs
IO-1.20/MANIFEST
CPAN.pm: Going to build G/GB/GBARR/IO-1.20.tar.gz
Checking for Socket...ok
Checking if your kit is complete...
Looks good
Writing Makefile for IO
/usr/local/bin/perl /usr/local/lib/perl5/5.8.6/ExtUtils/xsubpp -typemap
/usr/local/lib/perl5/5.8.6/ExtUtils/typemap IO.xs > IO.xsc && mv IO.xsc
IO.c
cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"1.20\"
-DXS_VERSION=\"1.20\" -fpic
"-I/usr/local/lib/perl5/5.8.6/i686-linux-thread-multi/CORE" -DI_POLL
poll.c
In file included from
/usr/local/lib/perl5/5.8.6/i686-linux-thread-multi/CORE/perl.h:37,
from poll.c:14:
/usr/local/lib/perl5/5.8.6/i686-linux-thread-multi/CORE/config.h:3017:1:
warning: "I_POLL" redefined
<command line>:11:1: warning: this is the location of the previous
definition
cp IO/Dir.pm blib/lib/IO/Dir.pm
cp IO/Handle.pm blib/lib/IO/Handle.pm
cp IO/Socket/INET.pm blib/lib/IO/Socket/INET.pm
cp IO/Poll.pm blib/lib/IO/Poll.pm
cp IO/Pipe.pm blib/lib/IO/Pipe.pm
cp IO/Seekable.pm blib/lib/IO/Seekable.pm
cp IO/Socket.pm blib/lib/IO/Socket.pm
cp IO/Select.pm blib/lib/IO/Select.pm
cp IO/File.pm blib/lib/IO/File.pm
cp IO.pm blib/lib/IO.pm
cp IO/Socket/UNIX.pm blib/lib/IO/Socket/UNIX.pm
Running Mkbootstrap for IO ()
cc -c -D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"1.20\"
-DXS_VERSION=\"1.20\" -fpic
"-I/usr/local/lib/perl5/5.8.6/i686-linux-thread-multi/CORE" -DI_POLL IO.c
In file included from
/usr/local/lib/perl5/5.8.6/i686-linux-thread-multi/CORE/perl.h:37,
from IO.xs:9:
/usr/local/lib/perl5/5.8.6/i686-linux-thread-multi/CORE/config.h:3017:1:
warning: "I_POLL" redefined
<command line>:11:1: warning: this is the location of the previous
definition
chmod 644 IO.bs
cp IO.bs blib/arch/auto/IO/IO.bs
chmod 644 blib/arch/auto/IO/IO.bs
IO.xs: In function `XS_IO__Seekable_getpos':
IO.xs:201: warning: passing arg 2 of `PerlIO_getpos' from incompatible
pointer type
IO.xs:208: error: `sv_undef' undeclared (first use in this function)
IO.xs:208: error: (Each undeclared identifier is reported only once
IO.xs:208: error: for each function it appears in.)
IO.xs: In function `XS_IO__Seekable_setpos':
IO.xs:219: warning: passing arg 2 of `PerlIO_setpos' from incompatible
pointer type
IO.xs: In function `XS_IO__File_new_tmpfile':
IO.xs:252: error: `sv_undef' undeclared (first use in this function)
make: *** [IO.o] Error 1
/usr/bin/make -j3 -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
cpan>
Perl is:
/usr/local/bin/perl -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
Platform:
osname=linux, osvers=2.4.22-1.2199.nptlsmp,
archname=i686-linux-thread-multi
uname='linux xeon.myior.com 2.4.22-1.2199.nptlsmp #1 smp wed aug 4
11:48:29 edt 2004 i686 i686 i386 gnulinux '
config_args=''
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='3.3.2 20031022 (Red Hat Linux 3.3.2-1)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=/lib/libc-2.3.2.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.3.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES
PERL_IMPLICIT_CONTEXT
Built under linux
Compiled at Feb 21 2005 18:32:34
@INC:
/usr/local/lib/perl5/5.8.6/i686-linux-thread-multi
/usr/local/lib/perl5/5.8.6
/usr/local/lib/perl5/site_perl/5.8.6/i686-linux-thread-multi
/usr/local/lib/perl5/site_perl/5.8.6
/usr/local/lib/perl5/site_perl
.
This is a dual xeon box. CPAN is using the -j3 flag for make.
I have spent several days looking (in all the wrong places, it seems)
for information on what might be going on here. I'm stumped.
Any clues or pointers would be greatly appreciated..
thanks,
\s
------------------------------
Date: 21 Feb 2005 20:35:14 -0800
From: "sganesa" <senthil.ganesan@gmail.com>
Subject: Web Application Installation Script
Message-Id: <1109046914.304741.120890@l41g2000cwc.googlegroups.com>
I have completed web application written in perl. I 'm facing
difficulty while deploying it in a linux box. Each time, i install, i
have to install all the perl modules, configure apache, create
database, test the connection. This kind of tasks are time consuming
and frustrating. Is there any way to write installation script to do
these tasks with few user inputs. Please help me folks.
Thanks in Advance, sGanesa
------------------------------
Date: Tue, 22 Feb 2005 02:53:00 GMT
From: nospam@geniegate.com
Subject: Re: Why aren't 'warnings' on by default?
Message-Id: <Lucy1108906404179670x7665dc@air.tunestar.net>
In: <slrnd1c8au.13a.tassilo.von.parseval@localhost.localdomain>, "Tassilo v. Parseval" <tassilo.von.parseval@rwth-aachen.de> wrote:
>If warnings in module context really and rightly suggest there's a bug,
>then the bug itself will sooner or later manifest in some other way,
>wont it? Otherwise it wouldn't be one. The point being that warnings
>rarely provide information useful to people not in charge of the code.
This is where I think warnings belong, for the developers.
I do appreciate the ability to use them, to *me* it's kind of like
discussing whether or not '-g' should be on gcc by default.
-g is great for debugging but I wouldn't want it on by default.
Likewise, -w is a useful tool.
If I see existing code that generates lots of warnings with -w,
I don't consider it buggy. If it bombs with 'use strict'
I consider it 'potentially buggy.'
Where MY code generates warnings, I will sometimes look into it,
but usually it's a harmless warning.
I suppose one could argue the same about 'use strict', that
perhaps it should be off for finished modules. (I like it
on, but I appreciate 'use strict' being optional)
Creativity & freedom is what makes perl better than
the other languages. It's nice to have choices.
Anyone know of the performance differences with -w turned on/off?
(Same with strict?)
Jamie
--
http://www.geniegate.com Custom web programming
guhzo_42@lnubb.pbz (rot13) User Management Solutions
------------------------------
Date: Mon, 21 Feb 2005 23:11:18 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Write-Only Socket
Message-Id: <Xns9604B90648E81asu1cornelledu@127.0.0.1>
Martin Kissner <news@chaos-net.de> wrote in
news:slrnd1kp6a.1hp.news@maki.homeunix.net:
> Hello together,
>
> I am trying to write a little tcp-server which creates a write only
> socket an test it with a little client.
I am very puzzled.
...
> The question is:
> Why do I have to shutdown(0) $session _and_ $socket on the server?
I must be missing something very obvious. The way I see it, a socket is
write only if you never read from it. There must be a reason you are doing
this.
Sinan
------------------------------
Date: Tue, 22 Feb 2005 01:15:52 +0100
From: Martin Kissner <news@chaos-net.de>
Subject: Re: Write-Only Socket
Message-Id: <slrnd1kudo.1hp.news@maki.homeunix.net>
A. Sinan Unur wrote :
> Martin Kissner <news@chaos-net.de> wrote in
> news:slrnd1kp6a.1hp.news@maki.homeunix.net:
>
>> Hello together,
>>
>> I am trying to write a little tcp-server which creates a write only
>> socket an test it with a little client.
>
> I am very puzzled.
>
> ...
>
>> The question is:
>> Why do I have to shutdown(0) $session _and_ $socket on the server?
>
> I must be missing something very obvious. The way I see it, a socket is
> write only if you never read from it. There must be a reason you are doing
> this.
The reason is that I wanted to know if it can be done.
[OT]
The reason why I want to know is that I have noticed that the syslogd on
my computer (system: Mac OS X) opens an upd port whereas 'man syslogd'
says:
| Syslogd opens an Internet domain socket as specified in /etc/services.
| Normally syslogd will only use this socket to send messages
| outwards, but in `insecure'' mode it will also read messages from this
| socket.
I see no reason for opening this socket as long as there is no central
syslog server on the network, but the socket gets opened in any case so
on first sight this seems to me to be an unnecessary security hole.
If the socket is r/w the service might be potentially exploitable on the
application layer although the server is not supposed to read from the
socket.
If the socket is write only, I assume that data sent to the opened port
will not be passed to the server process but blocked on the transport
layer by the OS.
(It would be my next question whether this is true, but I am pretty sure
it is.)
[/OT]
After I had executes my little experiment, I found the behaviour which I
did't understand.
That was my reason for asking (after I had consulted the documentation
of course).
Best Regards
Martin
--
perl -e 'print 7.74.117.115.116.11.32.13.97.110.111.116.104.101.114.11
.32.13.112.101.114.108.11.32.13.104.97.99.107.101.114.10.7'
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc. For subscription or unsubscription requests, send
#the single line:
#
# subscribe perl-users
#or:
# unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.
NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice.
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V10 Issue 7810
***************************************