[18382] in Perl-Users-Digest
Perl-Users Digest, Issue: 550 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Mar 22 18:05:43 2001
Date: Thu, 22 Mar 2001 15:05:13 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Message-Id: <985302312-v10-i550@ruby.oce.orst.edu>
Content-Type: text
Perl-Users Digest Thu, 22 Mar 2001 Volume: 10 Number: 550
Today's topics:
ANNOUNCE: Inline::Java 0.01 <patl@cpan.org>
Re: CPAN.pm endless configure loop ()
h2xs & typemap issue david_no_spam_@carter.net
Re: h2xs & typemap issue <joe+usenet@sunstarsys.com>
How do I set disk space to be used by a group not a use <batespd@ntlworld.com.nospam>
Re: Need Perl Programmer <uri@sysarch.com>
Re: Need Perl Programmer (David H. Adler)
Re: Oracle Developer Wanted (David H. Adler)
Re: Perl 5.6 - Spinning cursor routine? (Damian James)
require'ing OO modules on the fly - any danger? <djberge@uswest.com>
Re: Script mysteriously erases file it's supposed to ap <ddunham@redwood.taos.com>
Spawning a separate process hgajarla@hotmail.com
Re: Use of uninitialized value in string??? <ciaran.mccreesh@useaddressbelow.please>
Re: Use of uninitialized value in string??? <bcoon@sequenom.com>
Re: Use of uninitialized value in string??? (Lack Mr G M)
Re: Use of uninitialized value in string??? <ren@tivoli.com>
Re: Use of uninitialized value in string??? <ren@tivoli.com>
Re: Use of uninitialized value in string??? <ren@tivoli.com>
Re: Use of uninitialized value in string??? <dave@dave.org.uk>
Re: user module install under Solaris 8 <elaine@chaos.wustl.edu>
Re: Weird(?) magic word for sh to invoke perl under Lin <sun_tong_001@yahoo.com>
Re: Weird(?) magic word for sh to invoke perl under Lin (Abigail)
Yet Another Perl Conference 2001 - Registration/Second (Rich Lafferty)
Digest Administrivia (Last modified: 16 Sep 99) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 22 Mar 2001 19:11:45 +0000
From: Patrick LeBoutillier <patl@cpan.org>
Subject: ANNOUNCE: Inline::Java 0.01
Message-Id: <tbkmu84kunpaab@corp.supernews.com>
Inline::Java 0.01 has been uploaded to CPAN.
INTRODUCTION:
Inline::Java - Write Perl classes in Java.
Inline::Java lets you write Perl classes in Java.
Example:
use Inline Java => <<'END',
class JAxH {
public JAxH(String x){
System.out.println("Just Another " + x + " Hacker") ;
}
}
END
new JAxH('Inline') ;
When run, this complete program prints:
Just Another Inline Hacker
-------------------------------------------------------------------------------
INSTALLATION:
- This module requires Inline version 0.31 or higher to be installed.
- It also requires a version of the Java SDK 1.2 or higher to be
installed. You can get the latest Java SDK from Sun Microsystems
at http://java.sun.com. Follow the provided instructions in order
to install the Java SDK properly.
To install Inline::Java do this:
perl Makefile.PL
make
make test (see Note 2)
make install
You have to 'make install' before you can run it successfully.
Note 1: Use nmake on Windows systems. If you are using the COMMAND.COM shell
under Windows, Inline::Java will try to detect it. If it doesn't,
you should set the PERL_INLINE_JAVA_COMMAND_COM environment variable
to a true value. You also will need set this whenever you use the module
later on.
Note 2: In order for 'make test' to run properly, you should put the
directory to your Java binaries in either your PATH environment variable
or in the PERL_INLINE_JAVA_BIN environment variable. 'make test' will remind you
if you don't do this.
-------------------------------------------------------------------------------
FEATURES:
WARNING: THIS IS ALPHA SOFTWARE. It is incomplete and possibly unreliable.
It is also possible that some elements of the interface (API) will
change in future releases.
Inline::Java version 0.01 includes:
+ All classes and their public methods are exported to Perl, relative
to your current package.
+ All objects (except arrays) and primitive Java types are supported as
method parameters.
-------------------------------------------------------------------------------
INFORMATION:
= For more information on Inline::Java, see 'perldoc Inline::Java'.
= For information about Inline, see 'perldoc Inline'.
= For information on using Java, visit http://java.sun.org
The Inline::Java mailing list is inline@perl.org.
Send email to inline-subscribe@perl.org to subscribe.
Please send questions and comments to "Patrick LeBoutillier" <patl@cpan.org>
Copyright (c) 2001, Patrick LeBoutillier. All Rights Reserved.
_______________________________________________
Submitted via WebNewsReader of http://www.interbulletin.com
------------------------------
Date: Thu, 22 Mar 2001 19:57:00 GMT
From: root@pete1.hsnet1 ()
Subject: Re: CPAN.pm endless configure loop
Message-Id: <slrn9bkm5m.5ds.root@pete1.hsnet1>
In article <3AB97916.CEA19261@home.com>, Pete Schmitt wrote:
>Greetings, all.
> I've just fired up the CPAN module for the first time on a new
>Slackware 7.1 install (perl 5.6.0 that I had to compile from source so
[snip]
> I had this happen once before, on a different machine, different OS
>rev, older perl version. I can't for the life of me remember if I got
>it working again. I think I just installed all my modules by hand after
>that.
> Any ideas what's going on or how to fix it? I've been reading FAQ's and
>drilling into search engines all afternoon to no avail.
> Thanks much in advance.
> Pete.
Doh!
I so hate to follow myself up, but the solution was a no-brainer.
I simply tracked down CPAN.pm's Config.pm file and deleted it.
All was smooth after that. I entered my preferences, and Bingo,
It Just Worked!
Pete.
--
- Nobody moves very much in a Hanna Barbera cartoon! - Zorak
- Philip Glass! Muzak for the new millenium!
- Prschmitt at home dot com http://www.geocities.com/prschmitt/
------------------------------
Date: 22 Mar 2001 20:31:03 GMT
From: david_no_spam_@carter.net
Subject: h2xs & typemap issue
Message-Id: <99dne7$7m2$1@news.netmar.com>
Getting the following errors while trying to compile a new XS module. Occurs
for each "char" type in the input .h file:
>ARM.xs: In function `XS_arm_user_data2_tPtr_string1020':
>ARM.xs:390: incompatible types in assignment
>ARM.xs:391: warning: assignment makes integer from pointer without a cast
definition in the .h is as follows:
>typedef struct arm_user_data2_t {
> arm_int32_t format; /* Version/format id (userdata_e)
*/
> char string1020[1020]; /* 1020 byte opaque blob */
>} arm_user_data2_t;
Generated code in .xs is as follows:
>MODULE = Perf::ARM PACKAGE = arm_user_data2_t
>
>arm_user_data2_t *
>_to_ptr(THIS)
> arm_user_data2_t THIS = NO_INIT
> PROTOTYPE: $
> CODE:
> if (sv_derived_from(ST(0), "arm_user_data2_t")) {
> STRLEN len;
> char *s = SvPV((SV*)SvRV(ST(0)), len);
> if (len != sizeof(THIS))
> croak("Size %d of packed data != expected %d",
> len, sizeof(THIS));
> RETVAL = (arm_user_data2_t *)s;
> }
> else
> croak("THIS is not of type arm_user_data2_t");
> OUTPUT:
> RETVAL
>
>arm_user_data2_t
>new(CLASS)
> char *CLASS = NO_INIT
> PROTOTYPE: $
> CODE:
> Zero((void*)&RETVAL, sizeof(RETVAL), char);
> OUTPUT:
> RETVAL
>
>MODULE = Perf::ARM PACKAGE = arm_user_data2_tPtr
>
>arm_int32_t
>format(THIS, __value = NO_INIT)
> arm_user_data2_t * THIS
> arm_int32_t __value
> PROTOTYPE: $;$
> CODE:
> if (items > 1)
> THIS->format = __value;
> RETVAL = THIS->format;
> OUTPUT:
> RETVAL
>
>char
>string1020(THIS, __value = NO_INIT)
> arm_user_data2_t * THIS
> char __value
> PROTOTYPE: $;$
> CODE:
> if (items > 1)
> THIS->string1020 = __value; /* ==> error here */
> RETVAL = THIS->string1020; /* ==> warning here */
> OUTPUT:
> RETVAL
I think this is probably a pretty simple typemap issue, but I'm not sure how
to fix it.
Thanks in advance for any suggestions.
-David
david_no_spam_@carter.net
----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net
------------------------------
Date: 22 Mar 2001 16:57:30 -0500
From: Joe Schaefer <joe+usenet@sunstarsys.com>
Subject: Re: h2xs & typemap issue
Message-Id: <m3k85h31rp.fsf@mumonkan.sunstarsys.com>
david_no_spam_@carter.net writes:
> Getting the following errors while trying to compile a new XS module. Occurs
> for each "char" type in the input .h file:
Aren't those char's really character arrays? I pulled up a Jan 22
post by Ilya that might be of use:
http://groups.google.com/groups?hl=en&lr=&safe=off&ic=1&th=73687d7667a71b63&seekd=936040096#936040096
HTH
--
Joe Schaefer "I deal with temptation by yielding to it."
--Mark Twain
------------------------------
Date: Thu, 22 Mar 2001 20:33:58 -0000
From: "batespd" <batespd@ntlworld.com.nospam>
Subject: How do I set disk space to be used by a group not a user
Message-Id: <kjtu6.19608$Q4.3676356@news2-win.server.ntlworld.com>
I'm just passing message on for my son
Point me in the direction of any suitable FAQ
Thanks
------------------------------
Date: Thu, 22 Mar 2001 20:55:51 GMT
From: Uri Guttman <uri@sysarch.com>
Subject: Re: Need Perl Programmer
Message-Id: <x7itl134mf.fsf@home.sysarch.com>
>>>>> "RC" == Radix Corporation <jobs@radixcorp.com> writes:
RC> Company needs advanced Perl programmer to modify some scripts.
RC> Must have knowledge of XML. This is a small job that will
RC> probably take 1-3 days, but could lead to ongoing contract work.
RC> Please respond with hourly rates to jobs@radixcorp.com.
before the dhabot gets to you, you should go to jobs.perl.org to
actually find the right audience. this group is not for job postings.
uri
--
Uri Guttman --------- uri@sysarch.com ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com
------------------------------
Date: 22 Mar 2001 22:53:28 GMT
From: dha@panix2.panix.com (David H. Adler)
Subject: Re: Need Perl Programmer
Message-Id: <slrn9bl0j8.q60.dha@panix2.panix.com>
On Thu, 22 Mar 2001 09:37:04 -0500, Radix Corporation wrote:
>Company needs advanced Perl programmer to modify some scripts.
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently to
"news.announce.newusers", you might have already known this. :) (If
n.a.n is quieter than it should be, the relevent FAQs are available at
http://www.faqs.org/faqs/by-newsgroup/news/news.announce.newusers.html)
Another good source of information on how Usenet functions is
news.newusers.questions (information from which is also available at
http://www.geocities.com/nnqweb/).
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
http://jobs.perl.org may be of more use to you
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
"Now everyone, grep your pod, and we'll begin..." - John Porter in
<357FD9DB.2109@min.net>
------------------------------
Date: 22 Mar 2001 23:04:38 GMT
From: dha@panix2.panix.com (David H. Adler)
Subject: Re: Oracle Developer Wanted
Message-Id: <slrn9bl186.q60.dha@panix2.panix.com>
On Thu, 22 Mar 2001 17:57:06 GMT, remove wrote:
>has a database programmer position available in our
You have posted a job posting or a resume in a technical group.
Longstanding Usenet tradition dictates that such postings go into
groups with names that contain "jobs", like "misc.jobs.offered", not
technical discussion groups like the ones to which you posted.
Had you read and understood the Usenet user manual posted frequently to
"news.announce.newusers", you might have already known this. :) (If
n.a.n is quieter than it should be, the relevent FAQs are available at
http://www.faqs.org/faqs/by-newsgroup/news/news.announce.newusers.html)
Another good source of information on how Usenet functions is
news.newusers.questions (information from which is also available at
http://www.geocities.com/nnqweb/).
Please do not explain your posting by saying "but I saw other job
postings here". Just because one person jumps off a bridge, doesn't
mean everyone does. Those postings are also in error, and I've
probably already notified them as well.
If you have questions about this policy, take it up with the news
administrators in the newsgroup news.admin.misc.
http://jobs.perl.org may be of more use to you
Yours for a better usenet,
dha
--
David H. Adler - <dha@panix.com> - http://www.panix.com/~dha/
[Insert Angus Prune Tune here]
------------------------------
Date: 22 Mar 2001 22:37:13 GMT
From: damian@qimr.edu.au (Damian James)
Subject: Re: Perl 5.6 - Spinning cursor routine?
Message-Id: <slrn9bkvjv.1su.damian@puma.qimr.edu.au>
John W. Krahn chose Thu, 22 Mar 2001 14:01:26 GMT to say this:
>Damian James wrote:
>> ...
>>
>> Should have been $chars[$count++%@count] to allow for arbitrary @chars.
> ^^^^^^
> $chars[$count++%@chars]
Oops -- it was pretty late when I posted that.
I might take this opportunity to point out how continually impressed I am
at the extent and the quality of peer review in this group (not that I'd
consider myself a 'peer' to some of the very talented programmers here --
yet :-). I'm still a little stunned by what a remarkable resource it is.
Cheers,
Damian
[ not meaning to gush or anything ]
--
@;=0..23;@;{@;}=split//,<DATA>;while(@;){for($;=@;;--$;;){next if($:=rand($;
+1))==0+$;;@;[$;,$:]=@;[$:,$;]}print map{$;{$_}}(@| ,@;);push@|,shift@;if$;[
0]==@|;$|=1;select$&,$&,$&,1/80;print"\b"x(@;+@|)}print"\n"__END__
Just another Perl Hacker
------------------------------
Date: Thu, 22 Mar 2001 13:16:33 -0600
From: Daniel Berger <djberge@uswest.com>
Subject: require'ing OO modules on the fly - any danger?
Message-Id: <3ABA4F91.73ACC815@uswest.com>
Hi all,
I have a server running that takes post's from a web page. When the user
click's a link, a command is sent to the server:
# basic server code
while($clientSock = $serverSock->accept()){
my $command = <$clientSock>;
chomp $command;
}
What I would like to do instead is set up an OO module for each command, with
each object having a method called "interact" that it would call when the
server received the command.
# Code sample, partially derived from Perl Cookbook, p. 406.
#!/usr/bin/perl -wT # Taint checking on
...
while($clientSock = $serverSock->accept){
while(my $mod = <$clientSock>){
chomp $mod;
unless($mod =~ /^(\w+)$/i){ die "Invalid module name\n" } # taint check
$mod = $1;
# From here to end of loop - is this bad code?
eval "require $mod";
die if $@;
#$mod->import; # No import needed - we're assuming an OO module
$mod->new; # Create object
$mod->interact; # Do stuff
}
}
# Sample OO module
package Hello;
BEGIN{
use Exporter;
use vars qw(@ISA $VERSION);
@ISA = qw(Exporter);
$VERSION = '1.00';
}
sub new{
my $class = shift;
my $self = {};
bless($self,$class);
return $self;
}
sub interact{
my($self, %arg) = @_;
print "Hooray! It worked!\n";
}
1;
__END__
Thus, using the above module as an example, if the server received the string
"Hello", the server would then "require Hello", create a Hello object, and then
execute the "interact()" method, printing "Hooray! It worked".
Before going any further, let me state that I can't use "autouse", because it
will be the sys-admin writing the modules. That means I have no idea what
string he's going to send as a module name - could be "booger", could be
"jabberwocky". Point is, it won't be a fixed list. He'll know the rules (must
have corresponding ".pm" perl module, module must be OO, module must have a
"new" and "interact" method) for the modules, but I'll have no idea (nor do I
care) what he chooses as his module names. This leaves things very flexible
and just the way I (and he) want it.
After reading the various doom and gloom warnings about doing this on the fly
from the Cookbook, I'm going to admit that I don't completely understand
everything that is said there. What I am humbly asking for from this newsgroup
is whether or not this code is bad/dangerous, if there's a better way to do it,
or if this is the standard idiom and I should shut up.
Thanks much for your time and patience.
Sincerely,
Daniel Berger
--
"Evil will always triumph because Good is *dumb*"
- Dark Helmet, Spaceballs
------------------------------
Date: Thu, 22 Mar 2001 19:50:36 GMT
From: Darren Dunham <ddunham@redwood.taos.com>
Subject: Re: Script mysteriously erases file it's supposed to append to
Message-Id: <gIsu6.20859$qv3.8248960@nnrp5-w.sbc.net>
Katia Hayati <hayati@math.uiuc.edu> wrote:
> Another weird behavior: I created a hard link to the log file. The
> log file got deleted, but the hard link didn't, and there was no new info
> in it.
Then I think something somewhere else is deleting the file. (or your
machine has a bug in the operating system that causes open() to behave
strangely).
--
Darren Dunham ddunham@taos.com
Unix System Administrator Taos - The SysAdmin Company
Got some Dr Pepper? San Francisco, CA bay area
< How are you gentlemen!! Take off every '.SIG'!! >
------------------------------
Date: 22 Mar 2001 20:05:12 GMT
From: hgajarla@hotmail.com
Subject: Spawning a separate process
Message-Id: <99dlto$5ec$1@news.netmar.com>
Can anyone tell me how to spawn a process in a new shell or window. I am
looking for a perl command that lets me use on windows and unix platforms.
For example in windows I can say "system("start cmd")" for
opening a new dos
process. Similarly I can use -sh command to start a new shell in Unix. But
both of these are platform specific and I am looking for a command which is
perl native. Appreciate your help.
----- Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web -----
http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
NewsOne.Net prohibits users from posting spam. If this or other posts
made through NewsOne.Net violate posting guidelines, email abuse@newsone.net
------------------------------
Date: Thu, 22 Mar 2001 19:07:08 +0000
From: Ciaran McCreesh <ciaran.mccreesh@useaddressbelow.please>
Subject: Re: Use of uninitialized value in string???
Message-Id: <MX5ZYDAc1ku6IwZ1@harlawroad.freeserve.co.uk>
In article <3ABA49F8.582BFB0D@sequenom.com> (whatever that means), Bryan
Coon <bcoon@sequenom.com> writes
>Can someone please tell me what the heck I am doing wrong here? (This
>is the boiled down code btw)
<snip>
>if ($act eq '' && $userid eq '') {
(($act eq '') && ($userid eq ''))
HTH,
Ciaran
--
Ciaran McCreesh
mail: keesh@users.sourceforge.net
web: http://www.opensourcepan.com/
random text: Earn money in your spare time. Blackmail your friends.
------------------------------
Date: Thu, 22 Mar 2001 11:21:00 -0800
From: Bryan Coon <bcoon@sequenom.com>
Subject: Re: Use of uninitialized value in string???
Message-Id: <3ABA509C.C6BE8C00@sequenom.com>
Sorry, little follow up here- all values from query are null, i.e. The
script is being called by simple 'http://mysite/test.cgi', as opposed to
'http://mysite/test.cgi?jobid=32434&userid=939434 etc etc.
I want the script to do something when all query->params are empty...
Thanks
Bryan Coon wrote:
> Can someone please tell me what the heck I am doing wrong here? (This
> is the boiled down code btw)
>
> #!/usr/bin/perl -w
>
> use CGI qw(:standard);
> use strict;
>
> my $query = new CGI;
>
> my $jobid = $query->param("jobid");
> my $act = $query->param("act");
> my $actid = $query->param("id");
> my $userid = $query->param("userid");
>
> if ($act eq '' && $userid eq '') {
> #do some stuff
> }
>
> This generates the following error:
> Use of uninitialized value in string eq at /my/file/test.cgi line 13.
> Use of uninitialized value in string eq at /my/file/test.cgi line 13.
>
> Why?? Neither $act or $userid is unitialized (right?), because if I do
> if ($act eq '') { print "It's initialized!!"; }
>
> I get the print statement.
>
> I dont get it. My poor perl-newbie-coffee-deprived brain cannot make
> sense of this.
>
> Im sure its something simple and stupid, but can somone let me know
> where I have gone astray?
>
> Thanks!
------------------------------
Date: Thu, 22 Mar 2001 19:19:58 GMT
From: gml4410@ggr.co.uk (Lack Mr G M)
Subject: Re: Use of uninitialized value in string???
Message-Id: <2001Mar22.191958@ukwit01>
In article <3ABA49F8.582BFB0D@sequenom.com>, Bryan Coon <bcoon@sequenom.com> writes:
|>
|> my $act = $query->param("act");
|>...
|> my $userid = $query->param("userid");
|>...
|> if ($act eq '' && $userid eq '') {
|> #do some stuff
|> }
|>
|> This generates the following error:
|> Use of uninitialized value in string eq at /my/file/test.cgi line 13.
|> Use of uninitialized value in string eq at /my/file/test.cgi line 13.
|>
|> Why?? Neither $act or $userid is unitialized (right?),
What makes you say that? They will only be initialized if act and
userid as set as parametrs in the CGI program. It is perfectly possible
to set a variable to an undefined value. It looks as though you are
confusing the two. The fact that a variable has been assigned a value
does not mean that it is defined!
$val = undef;
$other_val = $val;
Now, $other_val has been assigned to but it is still undefined.
|> because if I do
|> if ($act eq '') { print "It's initialized!!"; }
|>
|> I get the print statement.
An undefined value is "empty", so it does equate to an empty string
in a string comparison (and 0 in a numeric one). This can be useful
when you don't care whether a variable is defined, just whether it has a
specific value.
--
--------- Gordon Lack --------------- gml4410@ggr.co.uk ------------
This message *may* reflect my personal opinion. It is *not* intended
to reflect those of my employer, or anyone else.
------------------------------
Date: 22 Mar 2001 13:41:37 -0600
From: Ren Maddox <ren@tivoli.com>
Subject: Re: Use of uninitialized value in string???
Message-Id: <m3zoed8uby.fsf@dhcp9-175.support.tivoli.com>
On 22 Mar 2001, ren@tivoli.com wrote:
> On Thu, 22 Mar 2001, bcoon@sequenom.com wrote:
>
>> Can someone please tell me what the heck I am doing wrong here?
>
> Perhaps this can shed some light:
>
> perl -we '$x = $y; if ($x eq "") { print "\$x is not set\n" }'
>
> The point is, assigning and undefined value to a variable still
> leaves the variable with an undefined value.
And I forgot to mention that what you'll probably want to use instead
is the "defined" operator:
perldoc -f defined
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: 22 Mar 2001 13:38:35 -0600
From: Ren Maddox <ren@tivoli.com>
Subject: Re: Use of uninitialized value in string???
Message-Id: <m38zlxa91g.fsf@dhcp9-175.support.tivoli.com>
On Thu, 22 Mar 2001, bcoon@sequenom.com wrote:
> Can someone please tell me what the heck I am doing wrong here?
Perhaps this can shed some light:
perl -we '$x = $y; if ($x eq "") { print "\$x is not set\n" }'
The point is, assigning and undefined value to a variable still leaves
the variable with an undefined value.
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: 22 Mar 2001 13:33:28 -0600
From: Ren Maddox <ren@tivoli.com>
Subject: Re: Use of uninitialized value in string???
Message-Id: <m3d7b9a99z.fsf@dhcp9-175.support.tivoli.com>
On Thu, 22 Mar 2001, ciaran.mccreesh@useaddressbelow.please wrote:
> In article <3ABA49F8.582BFB0D@sequenom.com> (whatever that means),
> Bryan Coon <bcoon@sequenom.com> writes
>>
>>if ($act eq '' && $userid eq '') {
>
> (($act eq '') && ($userid eq ''))
Nope... "&&" is already lower precedence than "eq", so those parens
have no effect.
--
Ren Maddox
ren@tivoli.com
------------------------------
Date: Thu, 22 Mar 2001 21:43:57 +0000
From: Dave Cross <dave@dave.org.uk>
Subject: Re: Use of uninitialized value in string???
Message-Id: <qaskbtcl0p7166c96d8qjfl4bgk49qdsbr@4ax.com>
On Thu, 22 Mar 2001 11:21:00 -0800, Bryan Coon <bcoon@sequenom.com>
wrote:
>Bryan Coon wrote:
>
>> Can someone please tell me what the heck I am doing wrong here? (This
>> is the boiled down code btw)
>>
>> #!/usr/bin/perl -w
>>
>> use CGI qw(:standard);
>> use strict;
>>
>> my $query = new CGI;
>>
>> my $jobid = $query->param("jobid");
>> my $act = $query->param("act");
>> my $actid = $query->param("id");
>> my $userid = $query->param("userid");
>>
>> if ($act eq '' && $userid eq '') {
>> #do some stuff
>> }
>>
>> This generates the following error:
>> Use of uninitialized value in string eq at /my/file/test.cgi line 13.
>> Use of uninitialized value in string eq at /my/file/test.cgi line 13.
>>
>> Why?? Neither $act or $userid is unitialized (right?), because if I do
>> if ($act eq '') { print "It's initialized!!"; }
>>
>> I get the print statement.
>>
>> I dont get it. My poor perl-newbie-coffee-deprived brain cannot make
>> sense of this.
>>
>> Im sure its something simple and stupid, but can somone let me know
>> where I have gone astray?
>
>Sorry, little follow up here- all values from query are null, i.e. The
>script is being called by simple 'http://mysite/test.cgi', as opposed to
>'http://mysite/test.cgi?jobid=32434&userid=939434 etc etc.
>
>I want the script to do something when all query->params are empty...
I that case, why not just do:
if ($query->param) {
my $act = $query->param('act');
# etc
} else {
# No parameters - do default stuff...
}
Oh, and if you're using
use CGI qw(:standard);
Then you don't need to create a CGI object. Just call the functions
directly:
if (param) {
my $act = param('act');
# etc..
}
hth,
Dave...
--
<http://www.dave.org.uk> SMS: sms@dave.org.uk
<http://www.manning.com/cross/>
------------------------------
Date: Thu, 22 Mar 2001 22:19:30 GMT
From: "Elaine Ashton" <elaine@chaos.wustl.edu>
Subject: Re: user module install under Solaris 8
Message-Id: <STuu6.7347$cF.152943@news1.nokia.com>
"Matthew L. Langford" <langfml@goodall.eng.auburn.edu> wrote in message
news:99be1s$3re$1@aunews.duc.auburn.edu...
> If I am on a machine without the /usr/bin/perl, or if I replace
> /usr/bin/perl with my own compiled version, this works...uh, well, it
> _can_ work: CPAN installs into ~/perl/lib. But _with_ Sun's
precompiled
> perl, I can't figure out how to get CPAN to override its settings and
> install modules into a local directory.
If you have the FORTE compilers, then use Solaris' Perl, if you do not
have
them, leave the /usr/bin/perl alone and install a gcc compiled
fresh-from-source
or http://www.sunfreeeware.com/ copy of Perl and have the users use that
copy
instead.
There is a problem in the Solaris Perl makemaker it would appear as if you
look at the Makefile in the constants section, you'll see that the
$(PREFIX)
is missing from a number of the INSTALL* constants. There is a Perl patch,
109029-01 in the recommended cluster, but it doesn't address this problem.
e.
------------------------------
Date: 22 Mar 2001 17:03:49 -0400
From: * Tong * <sun_tong_001@yahoo.com>
Subject: Re: Weird(?) magic word for sh to invoke perl under Linux
Message-Id: <sa8itl1o6ru.fsf@sun_tong_001.personal.yahoo.com>
abigail@foad.org (Abigail) writes:
> Paul Hughett (hughett@mercur.uphs.upenn.edu) wrote on MMDCCLX September
> MCMXCIII in <URL:news:99d2js$ead$1@netnews.upenn.edu>:
> ## In comp.os.linux.misc * Tong * <sun_tong_001@yahoo.com> wrote:
> ##
> ## : Under Solaris, I always use the following lines in my perl code to
> ## : invoke it:
> ##
> ## : #!/bin/sh -- # -*- perl -*- -w
> ## : eval 'exec perl $0 ${1+"$@"}'
> ## : if 0;
> ##
> ##
> ## If you use
> ##
> ## #! /usr/bin/env perl
> ##
> ## as the first line of your script, then it will be run using whatever
> ## copy of perl is found first on your path. I know this trick works
> ## on both RH Linux and Solaris, and believe that it will work on most
> ## Unix systems.
> ##
> ##
> ## The problem with using
> ##
> ## #! /usr/bin/perl
> ##
> ## for the first line, as suggested by some others, is that perl is often
> ## installed in /usr/local/bin/perl instead. (if it doesn't come with the
> ## system and is installed later by the sys admin).
YES! Paul, right on! I've been in so many systems that the Perl has
been installed in so many different places... This is exactly what
I'm looking for!
> OTOH, the system might come with /usr/bin/perl, but the admin installed
> another perl anyway, because either he doesn't have the same compiler,
> wants or needs difference configuration options, or wants or needs
> a different (newer?) version of perl, while (s)he cannot remove or
> symlink /usr/bin/perl because utilities coming with the OS depend on
> the particular version.
>
> Then /usr/bin/env only works for those who have the correct path.
yes, Abigail, but the normal situation is that the sys admin won't
change anything for any personal requests. Setting my path correctly
is far more easier than making them believe /usr/bin/perl is the
right place for perl...
--
Tong (remove underscore(s) to reply)
http://members.xoom.com/suntong001/
- All free contribution & collection & music from the heavens
------------------------------
Date: Thu, 22 Mar 2001 22:19:03 +0000 (UTC)
From: abigail@foad.org (Abigail)
Subject: Re: Weird(?) magic word for sh to invoke perl under Linux
Message-Id: <slrn9bkuin.vno.abigail@tsathoggua.rlyeh.net>
* Tong * (sun_tong_001@yahoo.com) wrote on MMDCCLX September MCMXCIII in
<URL:news:sa8itl1o6ru.fsf@sun_tong_001.personal.yahoo.com>:
%% abigail@foad.org (Abigail) writes:
%%
%% > Paul Hughett (hughett@mercur.uphs.upenn.edu) wrote on MMDCCLX September
%% > MCMXCIII in <URL:news:99d2js$ead$1@netnews.upenn.edu>:
%% > ## In comp.os.linux.misc * Tong * <sun_tong_001@yahoo.com> wrote:
%% > ##
%% > ## : Under Solaris, I always use the following lines in my perl code to
%% > ## : invoke it:
%% > ##
%% > ## : #!/bin/sh -- # -*- perl -*- -w
%% > ## : eval 'exec perl $0 ${1+"$@"}'
%% > ## : if 0;
%% > ##
%% > ##
%% > ## If you use
%% > ##
%% > ## #! /usr/bin/env perl
%% > ##
%% > ## as the first line of your script, then it will be run using whatever
%% > ## copy of perl is found first on your path. I know this trick works
%% > ## on both RH Linux and Solaris, and believe that it will work on most
%% > ## Unix systems.
%% > ##
%% > ##
%% > ## The problem with using
%% > ##
%% > ## #! /usr/bin/perl
%% > ##
%% > ## for the first line, as suggested by some others, is that perl is often
%% > ## installed in /usr/local/bin/perl instead. (if it doesn't come with the
%% > ## system and is installed later by the sys admin).
%%
%% YES! Paul, right on! I've been in so many systems that the Perl has
%% been installed in so many different places... This is exactly what
%% I'm looking for!
%%
%% > OTOH, the system might come with /usr/bin/perl, but the admin installed
%% > another perl anyway, because either he doesn't have the same compiler,
%% > wants or needs difference configuration options, or wants or needs
%% > a different (newer?) version of perl, while (s)he cannot remove or
%% > symlink /usr/bin/perl because utilities coming with the OS depend on
%% > the particular version.
%% >
%% > Then /usr/bin/env only works for those who have the correct path.
%%
%% yes, Abigail, but the normal situation is that the sys admin won't
%% change anything for any personal requests. Setting my path correctly
%% is far more easier than making them believe /usr/bin/perl is the
%% right place for perl...
Hmmm. So, setting the path correctly on all systems for all users under
all circumstances (cron! -T!) is *easier* than setting #! once for each
program on each system? Which you could do from 'make install' anyway?
Mind boggling.
As for that sysadmin, I am such a sysadmin. I do believe that
/usr/bin/perl is the right place - for the perl that comes with the
OS. The perl that's current, compiled with the available compiler and
compiled with the options desired does live elsewhere. /opt/perl for
instance. And guess what, that isn't in someones default $PATH.
Which would mean /usr/bin/env perl finds the perl in /usr/bin/perl.
That's the perl that doesn't have the additional modules installed.
Ooops.
Abigail
------------------------------
Date: 22 Mar 2001 15:28:17 GMT
From: rich@bofh.concordia.ca (Rich Lafferty)
Subject: Yet Another Perl Conference 2001 - Registration/Second CFP
Message-Id: <slrn9bk6gh.aic.rich@bofh.concordia.ca>
[La version française suit. / The French version follows.]
*** Third North American YAPC: Second Call for Participation ***
Yet Another Society
calls for your participation in
YAPC 2001
the Third North American
Yet Another Perl Conference
http://yapc.org/America/
McGill University,
Montreal, Quebec
Wednesday through Friday
June 13-15, 2001
YAPC is a place for people to meet and talk about Perl -- where
people who've done interesting things, people who are working
on the language itself, people who are using it daily,
and people who are looking to learn about it are all within
arm's reach. Some of the great authors and coders in the field
will be on hand to discuss their work, as well as the nature
and direction of Perl itself.
Please join us for three days of listening and talking about
Perl in Montreal.
** Conference registration is NOW OPEN!
http://na-register.yapc.org
Conference Registration Cost: USD$85 (about CAD$125)
** Dorm rooms will be available at the University; specific arrangements are
still being made with McGill, but we expect dorm accommodations
to cost under USD$25 per night for a single room.
** YAPC is looking for sponsors. Please Contact Kevin Lenzo
(lenzo@yapc.org) for information about how you can help support the
Yet Another Society and YAPC. Much of the necessary funding for
YAPC comes from the generous donations of our sponsors.
** Submitted papers: Submission Deadline: May 1, 2001
All topics are welcome. Here is a short list of subjects that
might be presented:
XML, CGI/Web, Interprocess Communication, GUIs (GTk, Tk),
Natural Language Processing, Interactive Perl, Agents,
Perl as Glue, Object-Oriented Perl, Scientific Applications,
Guts, Internals, JAPHs, Perl Poetry, System Administration,
DBI/DBD, Non-UNIX Perl, Security, Peer-to-Peer Communication,
Your Favorite Topic.
Please submit your abstracts to <na-author@yapc.org>. Authors are
requested to limit their abstracts to four sentences for
Lightning Talks, and to 300 words for other talks.
This year we will accept a number of types of talks:
* Lightning: 5 minutes
The lightning talks were instigated by Mark-Jason Dominus
last year in Pittsburgh, and were replicated with great
success at the European YAPC in London.
Participants speak for no more than five minutes, with the use
of conventional overheads. Any use of data projector, etc,
is discouraged, but allowed as long as the five minute time
limit is maintained (set-up will be done as the clock ticks).
Any topic is allowed, and some have been fantastically
humourous. Lightning talks are an excellent forum for
first-time speakers.
To propose a lightning talk, please send an abstract of no more
than four sentences to:
mjd-yapc-lightning+@plover.com
by the end of May 31, 2001. If your talk is selected for
presentation, you will be notified by June 6. For more complete
information about Lightning Talks, please visit
http://perl.plover.com/lightning-talks.html
* Standard: 20 minutes
A standard talk is the preferred format. This is enough
time to start a topic, introduce it with some pithy slides,
and open up to later conversation.
* Long and Extra-Long: 45 minutes, 90 minutes
Long talks are reserved for experienced speakers covering
large topics. If you have an in-depth topic you would like
to present in some detail, perhaps with considerable
discussion, a Long or Extra-Long talk may be the format of
choice.
* Tutorial: 3 hours + 30 break (possibly in two sets)
Half-day (or possibly full-day) tutorials.
Please submit your abstracts to <na-author@yapc.org>!
Thank you; we hope you will participate. If you have any questions,
please mail <na-help@yapc.org>.
---
Yet Another Society is a non-profit organization for the
advancement of collaborative efforts in computer and information
sciences. YAS promotes symposia, teaching, and group projects.
See http://yetanother.org for more information.
*** Third North American YAPC: Second Call for Participation ***
--------------------------------------------------------------------------
*** Troisième YAPC Amérique du Nord * Second appel à la participation ***
Yet Another Society
vous invite à participer à
YAPC 2001
La troisième
Yet Another Perl Conference
en Amérique du Nord
http://yapc.org/America/
Université McGill,
Montréal, Québec
Du mercredi au vendredi
13 au 15 juin, 2001
YAPC est un endroit où se rencontrer et parler de Perl; où sont réunis
des gens qui ont fait des choses intéressantes, qui travaillent sur le
langage lui-même, qui utilisent ce langage tous les jours et qui
veulent en apprendre plus. Quelques uns des meilleurs auteurs et
codeurs dans le domaine seront présents pour discuter de leur travail,
ainsi que de la nature et de l'avenir du langage Perl lui-même.
Joignez-vous donc à nous à Montréal pendant trois jours pour parler
et entendre parler de Perl.
** Les inscriptions sont maintenant ouvertes!
http://na-register.yapc.org/
Frais d'inscription: 85$US (environ 125$CDN)
** Des résidences étudiantes seront disponibles à Montréal; les
détails sont en négociation avec McGill, mais une chambre simple
coûtera probablement autour de 25$US.
** YAPC est à la recherche de commanditaires. Communiquez avec
Kevin Lenzo (lenzo@yapc.org) pour savoir comment vous pouvez
encourager la Yet Another Society et YAPC. Une grande partie des
fonds nécessaires à YAPC proviennent en effet des généreuses
contributions de nos commanditaires.
** Soumission des communications: Date de tombée: 1er mai 2001
Tous les sujets sont bienvenus. Voici une liste non-exhaustive de
sujets possibles:
XML, CGI/web, communication inter-processus, GUIs (Gtk, Tk),
traitement du langage naturel, Perl interactif, agents, Perl
comme langage-"colle", Perl orienté-objet, applications
scientifiques, entrailles, JAPHs, poésie Perl, administration de
systèmes, DBI/DBD, Perl non-Unix, sécurité, communication
'peer-to-peer', ...
Veuillez soumettre vos résumés à <na-author@yapc.org>. Les auteurs
sont priés de limiter leurs résumés à quatre phrases pour
les communications éclair, et à 300 mots pour les autres
communications.
Cette année, nous acceptons plusieurs sortes de communications:
* Communications éclair: 5 minutes
Les communications éclair ont été introduites l'été dernier à
Pittsburgh par Mark-Jason Dominus et ont été reprises avec
beaucoup de succès au YAPC européen à Londres.
Les participants disposent d'un maximum absolu de cinq minutes
pour présenter leur communication, habituellement à l'aide
d'un rétro-projecteur. Tout autre mécanisme de présentation
est déconseillé, car son installation peut gruger du temps
précieux!
Tout sujet est accepté, ce qui a donné lieu dans le passé à
quelques communications hautement humoristiques. Les
communications éclair constituent un excellent forum pour des
gens qui en sont à leurs premières présentations.
Pour proposer une communication éclair, envoyez un résumé de
quatre phrases ou moins à:
mjd-yapc-lightning+@plover.com
avant le 31 mai, 2001. Si votre proposition est retenue,
on vous en informera au plus tard le le 6 juin. Pour plus
d'informations sur les communications éclair, visitez
http://perl.plover.com/lightning-talks.fr.html
* Standard: 20 minutes
La communication standard constitue le format préféré. Il y a
suffisamment de temps pour introduire le sujet, présenter
quelques acétates bien choisis et permettre la discussion.
* Longue et extra-longue: 45 minutes, 90 minutes
Ces communications sont réservées aux présentateurs
expérimentés et elles couvrent des sujets plus vastes. Si vous
désirez présenter un sujet et le discuter en détail, ce format
pourrait s'avérer le plus approprié.
* Tutoriel: 3 heures + une pause
Tutoriels d'une demi-journée et possiblement d'une journée
complète.
Veuillez soumettre vos résumés à <na-author@yapc.org>!
Nous vous remercions et nous espérons que vous participerez en grand
nombre. Si vous avez des questions, communiquez avec
<na-help@yapc.org>.
---
Yet Another Society est une société à but non-lucratif vouée à
l'avancement d'efforts collaboratifs en informatique et en sciences de
l'information. YAS promouvoit des symposiums, de l'enseignement et
des projets de groupe. Pour plus d'informations, voir
http://yetanother.org.
*** Troisième YAPC Amérique du Nord * Second appel à la participation ***
------------------------------
Date: 16 Sep 99 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 16 Sep 99)
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: The mail to news gateway, and thus the ability to submit articles
| through this service to the newsgroup, has been removed. I do not have
| time to individually vet each article to make sure that someone isn't
| abusing the service, and I no longer have any desire to waste my time
| dealing with the campus admins when some fool complains to them about an
| article that has come through the gateway instead of complaining
| to the source.
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 550
**************************************