[10415] in Perl-Users-Digest
Perl-Users Digest, Issue: 4008 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Mon Oct 19 11:02:39 1998
Date: Mon, 19 Oct 98 08:00:15 -0700
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, 19 Oct 1998 Volume: 8 Number: 4008
Today's topics:
Re: Assigning to $! <erhmiru@erh.ericsson.se>
Re: CGI quandaries <matt@whiterabbit.co.uk>
Re: CGI.pm :: Can't locate object method 'isaCGI' ?! eugene@vertical.net
Re: File I/O eugene@vertical.net
Re: Hrm. Linguistic Quandry eugenes@my-dejanews.com
Re: Info on crypt() (Peter Holzer)
Re: Perl Y2K copmliance <jim.michael@gecm.com>
Re: Perl, dynamic loading, SCO OS 5 <Peter.Eckhardt@transcom.de>
Re: serial port IO? module? <erhmiru@erh.ericsson.se>
Re: serial port IO? module? <tchrist@mox.perl.com>
Re: Shell commands (Nathan V. Patwardhan)
Re: Slow Sort? <evonzee@tritechnet.com>
Special: Digest Administrivia (Last modified: 12 Mar 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 19 Oct 1998 15:57:17 +0200
From: Michal Rutka <erhmiru@erh.ericsson.se>
To: jdporter@min.net
Subject: Re: Assigning to $!
Message-Id: <laww5wods2.fsf@erh.ericsson.se>
John Porter <jdporter@min.net> writes:
> @output_from_bar = `bar.pl`;
>
> And in bar.pl, dup STDERR onto STDOUT.
> Or you might prefer to have a shell do that for you.
Or how about:
do 'bar.pl';
and test $@ instead?
Michal
------------------------------
Date: Mon, 19 Oct 1998 15:31:10 +0100
From: Matt Pryor <matt@whiterabbit.co.uk>
To: Marty Landman <marty@catnmoose.com>
Subject: Re: CGI quandaries
Message-Id: <362B4D2E.3170171@whiterabbit.co.uk>
Hmmm.. strange.
Have you tried sending the arguments as additional path information
instead?
<!-#exec cgi="/cgi-bin/count.cgi/page001"-->
Matt
--
Marty Landman wrote:
>
> I have some questions and comments/guesses based on my limited
> experience regarding my logging programs for my site. I am finding that
> using SSI to call my log pgm from within an SHTML file gives me a valid
> HTTP_REFERRER field but will not accept an argument which would allow me
> to know that the page is being hit.
>
> i.e. <!--#exec cgi="./cgi-bin/count.cgi"--> works, but if I do
> ...count.cgi?page=first... then it won't work, I get an invalid
> directive msg which I presume is from the server.
>
> So I wrote a logging pgm invoked as an image tag which spits out a 1x1px
> gif file and does accept an argument, it even logs it. Now on telnet I
> can see it work and also on a browser (NE4.05) w/o an argument. But
> once I add the argument if I look an NE3 I get a big old broken link,
> although the parm is evidently passed to my pgm and the pgm runs since
> the log is appropriately updated... nonetheless with the parm I get a
> server error, w/o the parm it runs fine.
>
> Am I running into a restriction on my server? It seems like I can only
> successfully parameterize a CGI call when it's in a link. The nature of
> logging would seem to be passive since I want to know when someone gets
> to a page, they don't necessarily have to DO anything once they get
> there. But I can't seem to use a parameterized CGI call for such a
> passive situation.
>
> Sorry about my ignorance, I've probably come further than I should have
> w/o reading the Camel book, Amazon assures me it's in the mail. Any
> leads would be appreciated.
> --
> Marty Landman Cat 'n Moose Web Site Design & Development
>
> Living Glass http://www.catnmoose.com/livinglass
> Web Safe Color Picker http://www.catnmoose.com/wsc.shtml
> Tic-Tac-Toe http://www.catnmoose.com/tictac.shtml
--
Matt's daily comic strip
Porridge and Fartcakes
http://www.whiterabbit.co.uk/cartoons
------------------------------
Date: Mon, 19 Oct 1998 14:42:20 GMT
From: eugene@vertical.net
Subject: Re: CGI.pm :: Can't locate object method 'isaCGI' ?!
Message-Id: <70fj4c$45t$1@nnrp1.dejanews.com>
Ted,
isaCGI() is a subroutine in CGI.pm. Hard to tell why it is failing without
seeing the rest of the relevant code (I assume that nobody messed with your
CGI.pm file and that isaCGI() still exists in there).
In article <362B0B19.2E8CE990@neis.com.au.remove.this.to.mail>,
ted <ted.dunstone@neis.com.au> wrote:
> I've checked archives, man pages and the FAQ's and I can't find a
> reference to this error which I
> get when using a perl script with the CGI.pm module and uploading a
> file.
>
> [Can't locate object method "isaCGI" via package "main" at (eval 14)
> line 1.]
>
> This occurs at the point that I use
> $cgi_query = new CGI;
>
> My non file upload scripts seem to work just fine ?
>
> If I add the isaCGI method to main it complains.
>
> [Can't call method "isaCGI" without a package or object reference at
> (eval 17) line 1.]
>
> Can anybody suggest a fix or what maybe going wrong.
>
> Many thanks,
>
> Ted.
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 19 Oct 1998 14:24:43 GMT
From: eugene@vertical.net
Subject: Re: File I/O
Message-Id: <70fi3a$2e3$1@nnrp1.dejanews.com>
Bob,
the main difficulty here is something those new to Perl quickly run against:
how to make a change to a file from a script. The code below does that ( it
follows pretty closely the canonical way of doing this as spelled out in the
FAQ, by using a temporary file; it also assumes that the read/write
permissions to the file are adequate). I haven't tested this particular code.
To do it without creating a temp file, which is one's first impulse, you
could just open a file for updating (with "+<$file_name"). But this will mean
that you are manipulating the file in memory, which can become dicey if the
file is large. You'll also have to keep track of where you are in the file
byte-wise, not line-wise (since you're dealing with an unstructured stream of
bytes, not lines), which is not wise (unless you're a fan of seek() and
tell() ).
-----------------------------------------------------------------------------
$orig_file = "/home/bob/bobs_file";
#the temp file name has to be unique,
#just to make sure it's not overwriting
#existing files; use the process id $$ for this
$new_file = "$orig_file.$$";
#open original file for reading
open (ORIGFH, "$orig_file") or die "Can't open $orig_file:$!;
#now create (open for writing) a new file
open (NEWFH, ">$new_file") or die "Can't create $new_file:$!;
#lock the file
flock (ORIGFH, 2);
#read from original file handle line by line
while (<ORIGFH>) {
#code to locate a counter, add 1 to the counter
#write the modified $_ to the temp file
print (NEWFH $_) or die "can't write to $new_file:$!";
}
close ORIGFH;
close NEWFH;
#make a backup of the original
rename ($orig_file, "$orig_file.bak") or die "can't rename $orig_file
to $orig_file.bak:$!";
rename ($new_file, "$orig_file") or die "can't rename $new_file to
$orig_file:$!";
--------------------------------------------------------------------------------
-----------------
In article <1puW1.172$H9.53270@proxye1.nycap.rr.com>,
"Bob L." <newsonly@usa.net> wrote:
> Hi and thank you:
>
> I have included the I/O code below. I tried +> when I open the file and it
> will not write to the file. Actually, the file gets wiped out. My first
> question was answered but now another short one. if 2 cgi's need to access
> the same text file and one of the cgi's is running, when the second
> executes, what happens when the file is locked as shown below?
>
> I really appreciate your help on this.
>
> Bob
>
> # Open the file containing phrases and read it in.
> open(FILE,"$random_file") || &error('open->random_file',$random_file);
> flock(FILE,2);
> @FILE = <FILE>;
> #close(FILE);&print_line;
>
> sub print_line {
>
> THE VARIABLE $NEWFILE IS SET IN THE CODE I DELETED
>
> # open(CHANGE, ">$random_file");
> print FILE $newfile;
> flock(FILE,8);
> close(FILE);
>
> exit;
> }
>
> ------------
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
Date: Mon, 19 Oct 1998 14:16:59 GMT
From: eugenes@my-dejanews.com
Subject: Re: Hrm. Linguistic Quandry
Message-Id: <70fhl1$25j$1@nnrp1.dejanews.com>
http://www.wins.uva.nl/~mes/jargon/t/troll.html
In article <361D8BAA.6DBE307B@bbnplanet.com>,
Elaine -HappyFunBall- Ashton <eashton@bbnplanet.com> wrote:
> Since the word 'troll' came up recently I did a little etymological
> digging and I find myself wondering about it. To troll is fishing
> casually on a long line. To trawl is to fish the bottom. I'm wondering
> if 'troll' is the proper term. Being that I live in a largely seaside
> community the difference is distinct. Perhaps to 'trowel' is the most a
> propos term. To dig and not to fish. What say you boys?
>
> e.
>
> But my mind was unclear and shaky. Nothing
> was happening. Everything was happening. Life
> was a stone, grinding and sharpening. - R. Carver -
>
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
------------------------------
Date: 19 Oct 98 13:50:24 GMT
From: hjp@wsr.ac.at (Peter Holzer)
Subject: Re: Info on crypt()
Message-Id: <hjp.908805024@titan.wsr.ac.at>
bart.mediamind@ping.be (Bart Lateur) writes:
>In particular I want to create my own password geberation/encryption
>code. One requirement I put on it, is that generated passwords only
>consist of upper case letter, and digits: [A-Z0-9].
Sure you want upper case, not lower case? Most people would hate to hit
caps lock to enter their password (German users would hate it even
more, since German keyboards have a shift lock key instead of caps
lock).
>So I'm trying to figure out the correlation between the input text, the
>salt, and the possible resulting characters in the encrypted string.
>I've looked at the crypt(3) man pages, but it doesn't even look like
>it's the same functionality. For example: these man pages talk about a
>4-bytes salt key, while I thought that Perl's crypt() uses only two
>characters for salt.
The standard Unix crypt function uses a 56 bit key (the password) and a
12 bit random number (the salt) to encrypt a known plain text. The
result is 64 bit ciphertext which is concatenated to the salt and
stored in the password file (in some base64-like format). Some Unices
use different schemes (BSD uses an MD5-Hash).
I suspect that perl always uses the crypt function from the C library,
so that the crypt(3) man page tells you about the behaviour of crypt
for your system.
A simple check: The standard unix crypt always returns a 13 character
string of the characters [+/0-9A-Za-z], and the first two characters
are equal to the salt. If your crypt behaves differently, your system
uses a different crypt function.
hp
------------------------------
Date: Mon, 19 Oct 1998 09:43:54 -0400
From: Jim Michael <jim.michael@gecm.com>
Subject: Re: Perl Y2K copmliance
Message-Id: <362B421A.6926@gecm.com>
Ron Hejdeman wrote:
> Anyone out there know if perl is Y2K compliant on Suns and Win-95 ?
http://x1.dejanews.com/dnquery.xp?QRY=y2k+perl&defaultOp=AND&LNG=ALL&ST=QS&svcclass=dnold&DBS=2
------------------------------
Date: Mon, 19 Oct 1998 16:54:15 +0200
From: Peter Eckhardt <Peter.Eckhardt@transcom.de>
Subject: Re: Perl, dynamic loading, SCO OS 5
Message-Id: <362B5297.3E300188@transcom.de>
Bill Walker schrieb:
>
> In comp.unix.sco.misc Peter Eckhardt <Peter.Eckhardt@transcom.de> wrote:
> > Dynamic Loading works nicely. I will send you an e-mail
> > with the config.
>
> Would you consider just posting it ? I doubt it is very long, and I
> suspect there is a lot of interest.
>
> 73 de Bill W5GFE
Here is it. Be aware it's tweaked in different places to fit
our local setup. Best use it as template for a Configure run
and change what is not appropriate for your system.
The dynamic loading stuff is controlled by the compiler and linker
options (thanks to the nice guy which once helped me to get them
right) and by the included/excluded modules. For some reason gdbm
and odbm only work when linked statically.All others do work
dynamically. It tried lbnet and libwww.They all work dynamically, too.
I posted via cut'n paste.Hope that didn't break, too much. Be careful.
Peter
--- config.sh ---- snip
#!/bin/sh
#
# This file was produced by running the Configure script. It holds all
the
# definitions figured out by Configure. Should you modify one of these
values,
# do not forget to propagate your changes by running "Configure -der".
You may
# instead choose to run each of the .SH files by yourself, or "Configure
-S".
#
# Package name : perl5
# Source directory : .
# Configuration time: Fri Aug 28 15:02:46 CETDST 1998
# Configured by : root
# Target system : sco_sv rapunzel 3.2 2 i386
Author=''
Date='$Date'
Header=''
Id='$Id'
Locker=''
Log='$Log'
Mcc='Mcc'
RCSfile='$RCSfile'
Revision='$Revision'
Source=''
State=''
_a='.a'
_exe=''
_o='.o'
afs='false'
alignbytes='4'
ansi2knr=''
aphostname=''
apiversion='5.005'
ar='ar'
archlib='/usr/local/lib/perl5/5.00502/i386-sco_sv'
archlibexp='/usr/local/lib/perl5/5.00502/i386-sco_sv'
archname='i386-sco_sv'
archobjs=''
awk='awk'
baserev='5.0'
bash=''
bin='/usr/local/bin'
binexp='/usr/local/bin'
bison=''
byacc='byacc'
byteorder='1234'
c='\c'
castflags='0'
cat='cat'
cc='cc'
cccdlflags=' '
ccdlflags='-belf -W l,-Bexport'
ccflags='-belf -w0 -U M_XENIX -DPERL_SCO5 -I/usr/local/include'
cf_by='root'
cf_email='root@rapunzel.rgw-express.de'
cf_time='Fri Aug 28 15:02:46 CETDST 1998'
chgrp=''
chmod=''
chown=''
clocktype='clock_t'
comm='comm'
compress=''
contains='grep'
cp='cp'
cpio=''
cpp='cpp'
cpp_stuff='42'
cppflags='-belf -w0 -U M_XENIX -DPERL_SCO5 -I/usr/local/include'
cpplast='-'
cppminus='-'
cpprun='cc -E'
cppstdin='cc -E'
cryptlib=''
csh='csh'
d_Gconvert='gcvt((x),(n),(b))'
d_access='define'
d_alarm='define'
d_archlib='define'
d_attribut='undef'
d_bcmp='define'
d_bcopy='define'
d_bsd='define'
d_bsdgetpgrp='undef'
d_bsdsetpgrp='undef'
d_bzero='define'
d_casti32='undef'
d_castneg='define'
d_charvspr='undef'
d_chown='define'
d_chroot='define'
d_chsize='define'
d_closedir='define'
d_const='define'
d_crypt='define'
d_csh='define'
d_cuserid='define'
d_dbl_dig='define'
d_difftime='define'
d_dirnamlen='undef'
d_dlerror='undef'
d_dlopen='undef'
d_dlsymun='undef'
d_dosuid='undef'
d_dup2='define'
d_endgrent='define'
d_endhent='define'
d_endnent='define'
d_endpent='define'
d_endpwent='define'
d_endsent='define'
d_eofnblk='define'
d_eunice='undef'
d_fchmod='define'
d_fchown='define'
d_fcntl='define'
d_fd_macros='define'
d_fd_set='define'
d_fds_bits='define'
d_fgetpos='define'
d_flexfnam='define'
d_flock='undef'
d_fork='define'
d_fpathconf='define'
d_fsetpos='define'
d_ftime='undef'
d_getgrent='define'
d_getgrps='define'
d_gethbyaddr='define'
d_gethbyname='define'
d_gethent='define'
d_gethname='undef'
d_gethostprotos='define'
d_getlogin='define'
d_getnbyaddr='define'
d_getnbyname='define'
d_getnent='define'
d_getnetprotos='define'
d_getpbyname='define'
d_getpbynumber='define'
d_getpent='define'
d_getpgid='define'
d_getpgrp2='undef'
d_getpgrp='define'
d_getppid='define'
d_getprior='define'
d_getprotoprotos='define'
d_getpwent='define'
d_getsbyname='define'
d_getsbyport='define'
d_getsent='define'
d_getservprotos='define'
d_gettimeod='define'
d_gnulibc='undef'
d_grpasswd='define'
d_htonl='define'
d_index='undef'
d_inetaton='define'
d_isascii='define'
d_killpg='define'
d_lchown='define'
d_link='define'
d_locconv='define'
d_lockf='define'
d_longdbl='define'
d_longlong='undef'
d_lstat='define'
d_mblen='define'
d_mbstowcs='define'
d_mbtowc='define'
d_memcmp='define'
d_memcpy='define'
d_memmove='define'
d_memset='define'
d_mkdir='define'
d_mkfifo='define'
d_mktime='define'
d_msg='define'
d_msgctl='define'
d_msgget='define'
d_msgrcv='define'
d_msgsnd='define'
d_mymalloc='undef'
d_nice='define'
d_oldpthreads='undef'
d_oldsock='undef'
d_open3='define'
d_pathconf='define'
d_pause='define'
d_phostname='undef'
d_pipe='define'
d_poll='define'
d_portable='define'
d_pthread_yield='undef'
d_pthreads_created_joinable='undef'
d_pwage='define'
d_pwchange='undef'
d_pwclass='undef'
d_pwcomment='define'
d_pwexpire='undef'
d_pwgecos='define'
d_pwquota='undef'
d_pwpasswd='define'
d_readdir='define'
d_readlink='define'
d_rename='define'
d_rewinddir='define'
d_rmdir='define'
d_safebcpy='define'
d_safemcpy='undef'
d_sanemcmp='define'
d_sched_yield='undef'
d_seekdir='define'
d_select='define'
d_sem='define'
d_semctl='define'
d_semctl_semid_ds='define'
d_semctl_semun='define'
d_semget='define'
d_semop='define'
d_setegid='define'
d_seteuid='define'
d_setgrent='define'
d_setgrps='define'
d_sethent='define'
d_setlinebuf='undef'
d_setlocale='define'
d_setnent='define'
d_setpent='define'
d_setpgid='define'
d_setpgrp2='undef'
d_setpgrp='define'
d_setprior='define'
d_setpwent='define'
d_setregid='define'
d_setresgid='undef'
d_setresuid='undef'
d_setreuid='define'
d_setrgid='undef'
d_setruid='undef'
d_setsent='define'
d_setsid='define'
d_setvbuf='define'
d_sfio='undef'
d_shm='define'
d_shmat='define'
d_shmatprototype='define'
d_shmctl='define'
d_shmdt='define'
d_shmget='define'
d_sigaction='define'
d_sigsetjmp='define'
d_socket='define'
d_sockpair='define'
d_statblks='define'
d_stdio_cnt_lval='undef'
d_stdio_ptr_lval='undef'
d_stdiobase='undef'
d_stdstdio='undef'
d_strchr='define'
d_strcoll='define'
d_strctcpy='define'
d_strerrm='strerror(e)'
d_strerror='define'
d_strtod='define'
d_strtol='define'
d_strtoul='define'
d_strxfrm='define'
d_suidsafe='undef'
d_symlink='define'
d_syscall='define'
d_sysconf='define'
d_sysernlst=''
d_syserrlst='define'
d_system='define'
d_tcgetpgrp='define'
d_tcsetpgrp='define'
d_telldir='define'
d_time='define'
d_times='define'
d_truncate='define'
d_tzname='define'
d_umask='define'
d_uname='define'
d_union_semun='undef'
d_vfork='define'
d_void_closedir='undef'
d_voidsig='define'
d_voidtty=''
d_volatile='define'
d_vprintf='define'
d_wait4='undef'
d_waitpid='define'
d_wcstombs='define'
d_wctomb='define'
d_xenix='undef'
date='date'
db_hashtype='u_int32_t'
db_prefixtype='size_t'
defvoidused='15'
direntrytype='struct dirent'
dlext='so'
dlsrc='dl_dlopen.xs'
doublesize='8'
dynamic_ext='B Data/Dumper Fcntl IO IPC/SysV NDBM_File Opcode POSIX
SDBM_File So
cket attrs re'
eagain='EAGAIN'
ebcdic='undef'
echo='echo'
egrep='egrep'
emacs=''
eunicefix=':'
exe_ext=''
expr='expr'
extensions='B Data/Dumper Fcntl IO IPC/SysV NDBM_File Opcode POSIX
SDBM_File Soc
ket attrs re GDBM_File ODBM_File Errno'
find='find'
firstmakefile='makefile'
flex=''
fpostype='fpos_t'
freetype='void'
full_csh='/bin/csh'
full_sed='/bin/sed'
gccversion=''
gidtype='gid_t'
glibpth='/usr/shlib /shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib
/lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib
/usr/local/lib'
grep='grep'
groupcat='cat /etc/group'
groupstype='gid_t'
gzip='gzip'
h_fcntl='true'
h_sysfile='false'
hint='previous'
hostcat='cat /etc/hosts'
huge=''
i_arpainet='define'
i_bsdioctl=''
i_db='undef'
i_dbm='define'
i_dirent='define'
i_dld='undef'
i_dlfcn='define'
i_fcntl='define'
i_float='define'
i_gdbm='define'
i_grp='define'
i_limits='define'
i_locale='define'
i_malloc='define'
i_math='define'
i_memory='undef'
i_ndbm='define'
i_netdb='define'
i_neterrno='undef'
i_niin='define'
i_pwd='define'
i_rpcsvcdbm='undef'
i_sfio='undef'
i_sgtty='undef'
i_stdarg='define'
i_stddef='define'
i_stdlib='define'
i_string='define'
i_sysdir='define'
i_sysfile='undef'
i_sysfilio='undef'
i_sysin='undef'
i_sysioctl='define'
i_sysndir='undef'
i_sysparam='define'
i_sysresrc='define'
i_sysselct='define'
i_syssockio=''
i_sysstat='define'
i_systime='define'
i_systimek='undef'
i_systimes='define'
i_systypes='define'
i_sysun='define'
i_syswait='define'
i_termio='undef'
i_termios='define'
i_time='define'
i_unistd='define'
i_utime='define'
i_values='define'
i_varargs='undef'
i_varhdr='stdarg.h'
i_vfork='undef'
incpath=''
inews=''
installarchlib='/usr/local/lib/perl5/5.00502/i386-sco_sv'
installbin='/usr/local/bin'
installman1dir=''
installman3dir=''
installprivlib='/usr/local/lib/perl5/5.00502'
installscript='/usr/local/bin'
installsitearch='/usr/local/lib/perl5/site_perl/5.005/i386-sco_sv'
installsitelib='/usr/local/lib/perl5/site_perl/5.005'
intsize='4'
known_extensions='B DB_File Data/Dumper Fcntl GDBM_File IO IPC/SysV
NDBM_File ODBM_File Opcode POSIX SDBM_File Socket Thread attrs re'
ksh=''
large=''
ld='ld'
lddlflags='-G -L/usr/local/lib -L/usr/local/bind/lib -belf'
ldflags=' -L/usr/local/lib'
less='less'
lib_ext='.a'
libc=''
libperl='libperl.a'
libpth='/usr/local/lib /shlib /lib /usr/lib /usr/ccs/lib'
libs='-lintl -lbind -lsocket -lnsl -lndbm -lgdbm -ldbm -lmalloc -ldl
-lld -lm -lc -lcrypt -lPW -lx'
libswanted='intl sfio socket inet nsl nm ndbm gdbm dbm db malloc dld ld
sun m c
cposix posix ndir dir crypt ucb bsd BSD PW x'
line='line'
lint=''
lkflags=''
ln='ln'
lns='/bin/ln -s'
locincpth='/usr/local/include /opt/local/include /usr/gnu/include
/opt/gnu/include /usr/GNU/include /opt/GNU/include'
loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib
/usr/GNU/lib
/opt/GNU/lib'
longdblsize='12'
longlongsize=''
longsize='4'
lp=''
lpr=''
ls='ls'
lseektype='off_t'
mail=''
mailx=''
make='make'
make_set_make='#'
mallocobj=''
mallocsrc=''
malloctype='void *'
man1dir=' '
man1direxp=''
man1ext='0'
man3dir=' '
man3direxp=''
man3ext='0'
medium=''
mips=''
mips_type=''
mkdir='mkdir'
models='none'
modetype='mode_t'
more='more'
mv=''
myarchname='i386-sco_sv'
mydomain='.rgw-express.de'
myhostname='rapunzel'
myuname='sco_sv rapunzel 3.2 2 i386 '
n=''
netdb_hlen_type='int'
netdb_host_type='const char *'
netdb_name_type='const char *'
netdb_net_type='unsigned long'
nm='nm'
nm_opt='-p'
nm_so_opt=''
nonxs_ext='Errno'
nroff='nroff'
o_nonblock='O_NONBLOCK'
obj_ext='.o'
optimize='-O0'
orderlib='false'
osname='sco_sv'
osvers='3.2'
package='perl5'
pager='/usr/local/bin/less'
passcat='cat /etc/passwd'
patchlevel='5'
path_sep=':'
perl='perl'
perladmin='root@rapunzel.rgw-express.de'
perlpath='/usr/local/bin/perl'
pg='pg'
phostname='hostname'
pidtype='pid_t'
plibpth=''
pmake=''
pr=''
prefix='/usr/local'
prefixexp='/usr/local'
privlib='/usr/local/lib/perl5/5.00502'
privlibexp='/usr/local/lib/perl5/5.00502'
prototype='define'
ptrsize='4'
randbits='15'
ranlib=':'
rd_nodata='-1'
rm='rm'
rmail=''
runnm='false'
scriptdir='/usr/local/bin'
scriptdirexp='/usr/local/bin'
sed='sed'
selecttype='fd_set *'
sendmail='sendmail'
sh='/bin/sh'
shar=''
sharpbang='#!'
shmattype='void *'
shortsize='2'
shrpenv=''
shsharp='true'
sig_name='ZERO HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE
ALRM TERM USR1 USR2 CHLD PWR WINCH URG POLL STOP TSTP CONT TTIN TTOU
VTALRM PROF XCPU XFSZ IOT CLD '
sig_name_init='"ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT",
"EMT", "FPE", "KILL", "BUS", "SEGV", "SYS", "PIPE", "ALRM", "TERM",
"USR1", "USR2", "CHLD","PWR", "WINCH", "URG", "POLL", "STOP", "TSTP",
"CONT", "TTIN", "TTOU", "VTALRM", "PROF", "XCPU", "XFSZ", "IOT", "CLD",
0'
sig_num='0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 6, 18, 0'
signal_t='void'
sitearch='/usr/local/lib/perl5/site_perl/5.005/i386-sco_sv'
sitearchexp='/usr/local/lib/perl5/site_perl/5.005/i386-sco_sv'
sitelib='/usr/local/lib/perl5/site_perl/5.005'
sitelibexp='/usr/local/lib/perl5/site_perl/5.005'
sizetype='size_t'
sleep=''
smail=''
small=''
so='so'
sockethdr=''
socketlib=''
sort='sort'
spackage='Perl5'
spitshell='cat'
split=''
src='.'
ssizetype='ssize_t'
startperl='#!/usr/local/bin/perl5'
startsh='#!/bin/sh'
static_ext='GDBM_File ODBM_File'
stdchar='unsigned char'
stdio_base='((fp)->_base)'
stdio_bufsiz='((fp)->_cnt + (fp)->_ptr - (fp)->_base)'
stdio_cnt='((fp)->_cnt)'
stdio_filbuf=''
stdio_ptr='((fp)->_ptr)'
strings='/usr/include/string.h'
submit=''
subversion='2'
sysman='/usr/local/man/man1'
tail=''
tar=''
tbl=''
tee='tee'
test='test'
timeincl='/usr/include/sys/time.h /usr/include/time.h '
timetype='time_t'
touch='touch'
tr='tr'
trnl='\n'
troff=''
uidtype='uid_t'
uname='uname'
uniq='uniq'
usedl='define'
usemymalloc='n'
usenm='false'
useopcode='true'
useperlio='undef'
useposix='true'
usesfio='false'
useshrplib='false'
usethreads='undef'
usevfork='true'
usrinc='/usr/include'
usemymalloc='n'
usenm='false'
useopcode='true'
useperlio='undef'
useposix='true'
usesfio='false'
useshrplib='false'
usethreads='undef'
usevfork='true'
usrinc='/usr/include'
uuname=''
version='5.00502'
vi=''
voidflags='15'
xlibpth=''
zcat=''
zip='zip'
# Configure command line arguments.
config_arg0='./Configure'
config_args=''
config_argc=0
PATCHLEVEL=5
SUBVERSION=2
CONFIG=true
------------------------------
Date: 19 Oct 1998 16:24:48 +0200
From: Michal Rutka <erhmiru@erh.ericsson.se>
To: griessl@ihs.ac.at
Subject: Re: serial port IO? module?
Message-Id: <lau310oci7.fsf@erh.ericsson.se>
Jonathan Feinberg <jdf@pobox.com> writes:
> Peter Griessl <griessl@ihs.ac.at> writes:
>
> > I need to talk to an external device connected to the serial
> > port using XON/XOFF flow control and I want to do this out
> > of perl
>
> perlfaq8: "How do I read and write the serial port?"
Not very helpfull. Specially if somebody is trying this on Win32 machine.
Moreover, ther is nothing in the FAQ about flow controll. How can you
do hardware flow control?
For win32 the one should use Win32::SerialPort.
Michal
> --
> Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
> http://pobox.com/~jdf
------------------------------
Date: 19 Oct 1998 14:37:11 GMT
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: serial port IO? module?
Message-Id: <70fiqn$1ie$1@csnews.cs.colorado.edu>
[courtesy cc of this posting sent to cited author via email]
In comp.lang.perl.misc, Michal Rutka <erhmiru@erh.ericsson.se> writes:
:Moreover, ther is nothing in the FAQ about flow controll. How can you
:do hardware flow control?
Why do people expect to learn everything about all manners of programming
solely in the Perl documentation?
You need to read the termios(3) manpage, which describes the POSIX
interface to tty devices. The IXON and IXOFF bits of the c_iflag
field in the termios structure is what you need. Supplement your
reading of termios(3) with the documentation for the Perl POSIX module.
Here's a demo of manipulating termios:
use POSIX qw(:termios_h);
$term = POSIX::Termios->new;
$term->getattr(fileno(STDIN));
$erase = $term->getcc(VERASE);
$kill = $term->getcc(VKILL);
printf "Erase is character %d, %s\n", $erase, uncontrol(chr($erase));
printf "Kill is character %d, %s\n", $kill, uncontrol(chr($kill));
$term->setcc(VERASE, ord('#'));
$term->setcc(VKILL, ord('@'));
$term->setattr(1, TCSANOW);
print("erase is #, kill is @; type something: ");
$line = <STDIN>;
print "You typed: $line";
$term->setcc(VERASE, $erase);
$term->setcc(VKILL, $kill);
$term->setattr(1, TCSANOW);
sub uncontrol {
local $_ = shift;
s/([\200-\377])/sprintf("M-%c",ord($1) & 0177)/eg;
s/([\0-\37\177])/sprintf("^%c",ord($1) ^ 0100)/eg;
return $_;
}
Of course, if you are on a closed/proprietary/non-POSIX system,
then you lose. Repeatedly. :-)
--tom
--
X-Windows: Some voids are better left unfilled.
--Jamie Zawinski
------------------------------
Date: Mon, 19 Oct 1998 14:55:47 GMT
From: nvp@shore.net (Nathan V. Patwardhan)
Subject: Re: Shell commands
Message-Id: <TpIW1.123$OZ4.38176@news.shore.net>
Mark-Jason Dominus (mjd@op.net) wrote:
: I don't see why not. I think `command' is a common locution for any
: function or subroutine which is used primarily for its side effects.
: I also think that if you were to study usage in this newsgroup, you'd
: see that that's how people use it:
Well, to be a wee bit nitpicky -- I've reread the manpages for the
examples which you mention and I feel that a distinction should be
made between 'function' and 'command'. Although I do agree that
'command' has become a common locution, I do feel that it's misused:
like someone who writes 'CGIs' which doesn't mean that they're
actually *writing their own CGI*.
: the `system' command
I feel that system() "is a function which causes the string to be
given to the shell as input ..."
: the `print' command
print is a shell built-in as well as a Perl function, right?
: the `mkdir' command
I don't feel that mkdir(1) and mkdir(2) should be confused.
: Contrastingly, people never use `command' to indicate functions that
: have no side effects; that is because `command' suggests the
: imperative, and these functions aren't imperative:
I'll agree with this. But I've observed that some people who've
referred to your examples as functions only did so by accident. :-)
: It used to drive me nuts when the Pascal programmers would say primly
: `That is not a function. It is a subroutine.' and they had more of an
: excuse to say that than you do to say that `system' is not a command.
Well, it also drives me nuts when distinct terms become
interchangeable and even slangy. So I guess that we're opposite but
even. :-)
--
Nate Patwardhan|root@localhost
"Fortunately, I prefer to believe that we're all really just trapped in a
P.K. Dick book laced with Lovecraft, and this awful Terror Out of Cambridge
shall by the light of day evaporate, leaving nothing but good intentions in
its stead." Tom Christiansen in <6k02ha$hq6$3@csnews.cs.colorado.edu>
------------------------------
Date: Mon, 19 Oct 1998 09:17:01 -0500
From: Eric Von Zee <evonzee@tritechnet.com>
Subject: Re: Slow Sort?
Message-Id: <362B49DD.4AB092D5@tritechnet.com>
Matt Pryor wrote:
> The sort function in this code:
> <snip timed code>
> Took just 9 seconds under Win95 with a Cyrix 200mhz processor with 32
> meg ram...
>
> Matt
> ----
My 2"...
5 Seconds on a P266/Sin95/64mb physical/100mb swap
11 secs on a sparc/sunOS5 box, remote.
12 secs on an NT box, hardware unk., remote.
40 minutes???!?!? Ouch!
Cheers!
-Eric
Best Regards, | Psychotics are consistently
Tritech Marketing | inconsistent. The essence of
| sanity is to be inconsistently
Eric Von Zee | inconsistent.
Webmaster | -- Larry Wall
------------------------------
Date: 12 Jul 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Mar 98)
Message-Id: <null>
Administrivia:
Special notice: in a few days, the new group comp.lang.perl.moderated
should be formed. I would rather not support two different groups, and I
know of no other plans to create a digested moderated group. This leaves
me with two options: 1) keep on with this group 2) change to the
moderated one.
If you have opinions on this, send them to
perl-users-request@ruby.oce.orst.edu.
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 4008
**************************************