[20002] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 2197 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Nov 24 18:05:40 2001

Date: Sat, 24 Nov 2001 15:05:05 -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: <1006643104-v10-i2197@ruby.oce.orst.edu>
Content-Type: text

Perl-Users Digest           Sat, 24 Nov 2001     Volume: 10 Number: 2197

Today's topics:
        ActivePerl Windows 2000 online documentation <ericm@vertical.com>
    Re: CGI Problem on RedHat 7.1 <Juha.Laiho@iki.fi>
    Re: CGI Problem on RedHat 7.1 (Mark Taylor)
    Re: CGI Problem on RedHat 7.1 (David Efflandt)
    Re: Creating a Perl app.  Help with installation? <comdog@panix.com>
    Re: modify arguments in a sub / function... <moodie@fast.net>
    Re: NB: HTTP headers <goldbb2@earthlink.net>
        Newbie OO/Inheritance question <dlc-usenet@halibut.com>
    Re: Parsing speed <goldbb2@earthlink.net>
        Please help with odd error. <CGI_SPAM@BLOCKER_asayogure.com>
    Re: Question on  substitution <peb@bms.umist.ac.uk>
    Re: Using CGI.pm to obtain a list of params <flavell@mail.cern.ch>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Sat, 24 Nov 2001 14:07:41 -0800
From: "Eric McDaniel" <ericm@vertical.com>
Subject: ActivePerl Windows 2000 online documentation
Message-Id: <3c001a16$0$16152$4c41069e@reader0.ash.ops.us.uu.net>


I just installed the 630 build of ActivePerl for Windows 2000, and the
online documentation seems to be a step backward. Before I start sounding
like an ingrate, let me just state that I love the product and really
appreciate what ActiveState is giving away for free.

However, with previous builds the documentation was pure html and asp. When
I installed a module using PPM, the module documentation automatically
appeared in the module index. Nice.

With the new compiled html documentation, newly installed modules do not
appear in the module index. Nor are the old html/asp files provided. It
becomes a hassle to look up a module's documentation, something I used to do
quite frequently.

I understand that the compiled html documentation may be a work-in-progress,
and ultimately could be much more useful (with full text search etc).

Unless I am missing something obvious, in which case I'm sure all of you
good people will set me straight, I am appealing to anyone who is listening
at ActiveState to please restore the pre-build-630 html documentation for
the next build.

Eric



------------------------------

Date: Sat, 24 Nov 2001 20:16:00 GMT
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: CGI Problem on RedHat 7.1
Message-Id: <9tov0o$pg4$1@ichaos.ichaos-int>

"$uRoot" <admin@bogus.thinktankdecoy.com> said:
>Hi.  I don't do a lot of work with CGI, so was wondering if anyone knew what
>the problem might be here.

Hmm.. luckily -as this is comp.lang.perl.misc- your question doesn't
seem to have any relevance to CGIs. You're just plain having problems
with running perl scripts.

>In testing, I've run it two ways from the command line:

># ./script.cgi
>bash: ./script.cgi: No such file or directory

># perl script.cgi
>
>This executes it fine.
>
>I have Perl defined as
>#!/usr/bin/perl
>
>This is the correct path to Perl.

This would be exactly the behaviour you get if you happen to have
"dos-style" line-endings (i.e. CR-LF pairs instead of just LF).

>I've also checked the script, just to make sure there weren't any funky line
>breaks or anything, don't see anything out of whack.

I was about to ask whether you remembered to make the script executable,
but that produces a different error message. Could you please double-
check the line-endings, f.ex. with the following incantation:

dd if=script.cgi bs=1 count=20 | od -t x1

This'll produce something like:
0000000 23 21 2f 75 73 72 2f 62 69 6e 2f 70 65 72 6c 0a
0000020 70 72 69 6e
0000024

Check that the character code following the "0a" is _not_ "0d".

Check also, that in addition of "perl ./script.cgi" you're able to run
your script with "/usr/bin/perl ./script.cgi".
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ UH++++$ UL++++$ P++@ L+++ E(-) W+$@ N++ !K w !O
         !M V PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h--- r+++ y+++
"...cancel my subscription to the resurrection!" (Jim Morrison)


------------------------------

Date: 24 Nov 2001 15:55:00 -0600
From: mtaylor@lrim.com (Mark Taylor)
Subject: Re: CGI Problem on RedHat 7.1
Message-Id: <Xns9163A4813E7BEmtaylorlrimcom@128.242.171.114>

"$uRoot" <admin@bogus.thinktankdecoy.com> wrote in
<9tojch015ea@enews3.newsguy.com>: 

>Hi.  I don't do a lot of work with CGI, so was wondering if anyone knew
>what the problem might be here.
>
>I have a cgi script that I'm trying to execute straight out of the
>cgi-bin. Permissions should be fine, etc.  When I run it, I get a 500
>Server Error. Log shows "Premature End of Script".  Looks to me like the
>problem is the Perl path.
>
>In testing, I've run it two ways from the command line:
>
>First:
># ./script.cgi
>bash: ./script.cgi: No such file or directory
>
>This would lead me to think that the path to perl declared in the script
>is wrong.
>
>Second:
># perl script.cgi
>
>This executes it fine.
>
>I have Perl defined as
>#!/usr/bin/perl
>
>This is the correct path to Perl.
>
>I've also checked the script, just to make sure there weren't any funky
>line breaks or anything, don't see anything out of whack.
>
>Any ideas?
>
>Thanks.
>
>

Sounds like your path to perl is incorrect. On a command line type "which 
perl" (without the quotes, of course).

Correct the line if necessary and try again. If you still get an error 
check the permissions on the file AND THE DIRECTORY!


Cheers,
Mark
______________________________________________________________________________
Posted Via Binaries.net = SPEED+RETENTION+COMPLETION = http://www.binaries.net


------------------------------

Date: Sat, 24 Nov 2001 22:59:29 +0000 (UTC)
From: efflandt@xnet.com (David Efflandt)
Subject: Re: CGI Problem on RedHat 7.1
Message-Id: <slrna009ig.baj.efflandt@typhoon.xnet.com>

On Sat, 24 Nov 2001, $uRoot <admin@bogus.thinktankdecoy.com> wrote:
> Hi.  I don't do a lot of work with CGI, so was wondering if anyone knew what
> the problem might be here.
> 
> I have a cgi script that I'm trying to execute straight out of the cgi-bin.
> Permissions should be fine, etc.  When I run it, I get a 500 Server Error.
> Log shows "Premature End of Script".  Looks to me like the problem is the
> Perl path.
> 
> In testing, I've run it two ways from the command line:
> 
> First:
> # ./script.cgi
> bash: ./script.cgi: No such file or directory
> 
> This would lead me to think that the path to perl declared in the script is
> wrong.
> 
> Second:
> # perl script.cgi
> 
> This executes it fine.
> 
> I have Perl defined as
> #!/usr/bin/perl
> 
> This is the correct path to Perl.

Sure sounds to me like this script has touched a Windows box.  The problem 
is that it contains carriage returns, so bash cannot find "perl^M".  The 
^M is an invisible carriage return, hence the confusing error.

Without knowing what utilities you have on your system, a quick way to 
remove carriage returns is to load it into 'pico' (in pine package), do a 
space, backspace and save the file.  Then it will have proper line endings.
And use a Unix editor from now on.  If you are not a diehard Unix user, 
pico is easy enough.

-- 
David Efflandt - All spam is ignored - http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/


------------------------------

Date: Sat, 24 Nov 2001 16:19:47 -0600
From: brian d foy <comdog@panix.com>
Subject: Re: Creating a Perl app.  Help with installation?
Message-Id: <comdog-72640A.16194724112001@news.panix.com>

In article <9tohmd$af$1@dipsy.missouri.edu>, 
<mcnuttj@dnps-linux1.telecom.missouri.edu> wrote:

> Too bad I'm going to have to rename most of my modules.  Check this out:

> Old way:
> use lib '/usr/local/lib/jscan';
> use jscanconvert;
> use jscangetmods;
> use jscangettype;
> ...
> 
> New way:
> use JScan::convert;
> use JScan::getmods;
> use JScan::gettype;

[you shouldn''t use all lowercase module names since those
are reserved by Perl :)]

this actually isn't that bad if you use MakeMaker.  simply
put all of yor modules in a flat directory in your distribution, 
say 'lib', then use the PM key to WriteMakefile to tell make
where to put then in blib.  If you decide to change the structure
all you fix are the package declarations and Makefile.PL.  you
don't have to move around files in the distribution.

WriteMakefile( 
    ...stuff...
    PM => {
        'lib/JScan.pm'   => '$(INST_LIBDIR)/Jscan.pm',
        'lib/Convert.pm' => '$(INST_LIBDIR)/Jscan/Convert.pm',
         },
    ...stuff...
    );

If you wanted to get really fancy, Makefile.PL could walk through
lib, look at the package names of all of the .pm files, and build
PM for you.  i started doing that (along with some MANIFEST
tricks) because a project would add new functionality by
adding modules.  if i dropped a module into lib, my Makefile.PL
figured it out.  i then, quite accidently, discovered that 
it was almost trivial to affect the installation layout by
just changing the package declarations inside the module
files themselves ;)

-- 
brian d foy <comdog@panix.com> - Perl services for hire
CGI Meta FAQ - http://www.perl.org/CGI_MetaFAQ.html
Troubleshooting CGI scripts - http://www.perl.org/troubleshooting_CGI.html



------------------------------

Date: Sat, 24 Nov 2001 16:16:16 -0500
From: "MisterSoftware" <moodie@fast.net>
Subject: Re: modify arguments in a sub / function...
Message-Id: <u003hnop5fph26@corp.supernews.com>

OK!  I've got it down to this, and got the whole program working (does
Anagrams - strings in strings...).

Thanks for all the help.  It's down to this:

sub contains {
    my $i;
    foreach $i (split(//,$_[1])) {return 0 unless $_[0]=~s/\Q$i//;}
    return 1;
}

My compiler doesn't like:
 foreach my $i (split(//,$_[1])) {return 0 unless $_[0]=~s/\Q$i//;}

so I had to do it the other way.

Now I just have to build a build a form and get it running on my page at
wbmoodie.com...

Tomorrow.




------------------------------

Date: Sat, 24 Nov 2001 16:29:28 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: NB: HTTP headers
Message-Id: <3C001138.4C46412F@earthlink.net>

juhani kettunen wrote:
> 
> Hiyas,
> 
> I'm new to Perl and pretty much have just copy+paste/modified things I
> have needed so far.
> 
> Now I need to send XML-RPC format page to a front-end with a specific
> header. What I don't know, and haven't find confirmation is can I send
> whatever format header, or can I only use the existing headers?
> 
> would this work, as connection isn't one of normal header fields?
> 
> $req->header(
>   'Connection' => 'keep-alive',
>   'Content-type' => 'text/html',
>   'Content-length' => '181'
> );

Actually, Connection *is* a normal http header field.  Whether or not it
will be honored by the browser and whatever's on the other end, I've no
clue.

> and in another case I would have to send only a header to a frontend
> that would further use the info from headers to store database
> information (JDBC). How would this be done, would the below work?

The data in the stuff below looks like part of a query, not part of what
should be going in the http headers.

> $req = HTTP::Request->new(GET => 'http://someURL/AddOrder');
>   $req->header(
>      'SENDER' => $sender,
>      'RECEIVER' => $receiver,
>      'DATE' => $date,
>      'TIME' => $time,
>      'PRERECORDED' => $prerecorded,
>      'MSGFILE' => $msgfile
> );
>   $res = $ua->request($req);

use HTTP::Common;
$req = POST 'http://someURL/AddOrder', [
     'SENDER' => $sender,
     'RECEIVER' => $receiver,
     'DATE' => $date,
     'TIME' => $time,
     'PRERECORDED' => $prerecorded,
     'MSGFILE' => $msgfile
];
$res = $ua->request($req);

Or something like that...

-- 
Klein bottle for rent - inquire within.


------------------------------

Date: Sat, 24 Nov 2001 20:44:05 -0000
From: Dave Carmean <dlc-usenet@halibut.com>
Subject: Newbie OO/Inheritance question
Message-Id: <u001kl4kscto79@corp.supernews.com>


So I think I understand (generally) inheritance by a child class.  
What about existing objects?  E.g. say I'm tracking "tickets" of various 
kinds.  I have a superclass called Ticket which has basic stuff like 
reporting party, date and time reported, description, etc., etc.  

At some point the issue is narrowed down sufficiently that it's appropriate 
to use several additional fields.  E.g. it's determined to be a hardware 
problem rather than software, so we need to start tracking serial numbers, 
etc.  How do I turn the existing Ticket object into a Ticket::Hardware 
object?  Do I write Ticket::Hardware::new such that if it's handed a 
Ticket object it re-blesses it as type Ticket::Hardware?  And then 
I start adding new attributes to the inherited hash (or whatever)?  

What if I'm keeping class data like the total number of base Ticket 
objects that haven't been morphed into more specialized types?  Does 
DESTROY get called when it gets reblessed?

I think I'm just a few details shy of "getting it" :o)

Thanks.



------------------------------

Date: Sat, 24 Nov 2001 16:19:11 -0500
From: Benjamin Goldberg <goldbb2@earthlink.net>
Subject: Re: Parsing speed
Message-Id: <3C000ECF.105A7AD8@earthlink.net>

John Kenyon wrote:
> 
> Hi,
> 
> I have a small chunk of code which converts part of a csv into an
> array. It works fine but is very slow indeed. I am new to perl and
> would be interested in any tips on how I could optimise this.
> 
> I am trying to convert from -
>   "j","bob","tall","(","footy","rugby","golf","ski",")"
> to an array
>   footy
>   rugby
>   golf
>   ski
> 
> (Note that there may be any number of items between the quoted
> brackets)

#!/usr/local/bin/perl -w
use strict;
use Text::CSV_XS;
open( my($fh), "<thefile.csv" )
    or die "Couldn't open thefile.csv: $!";
my $csv = Text::CSV_XS->new;
while( my $cols = $csv->getline($fh) ) {
    my ($i) = grep "(" eq $$cols[$_], 0 ..$#$cols or next;
    my ($j) = grep ")" eq $$cols[$_], $i..$#$cols or next;
    my @sports = @$cols[$i+1 .. $j-1];
    print "@sports\n";
}
__END__

-- 
Klein bottle for rent - inquire within.


------------------------------

Date: Sat, 24 Nov 2001 20:51:27 GMT
From: "Asayogure" <CGI_SPAM@BLOCKER_asayogure.com>
Subject: Please help with odd error.
Message-Id: <jLTL7.43605$RG1.22638808@news1.rdc1.sfba.home.com>

I am new to MySQL but not perl/cgi.  I have the following in the main
logic of my script:

----------------------------------------------------------------
if ($choice eq "")     # initial script invocation
  {
    determine_user ();
  }
elsif ($choice eq "enter")
  {#START ELSIF ($CHOICE EQ "ENTER")
    my $dbh = WebDB::connect (); # declare database handling variable, and
     # assign connection properties through WebDB.pm
    my $row = validate_user($dbh, param ("id"));
    $global_user = $row->{user_name};
    $global_pass = $row->{password};
     #########################
    #########################
    #   ERROR CHECKING:        #
    #########################
    #########################
    if ((length(param("id"))) == (0))
      {
        print "<IMG SRC=\"https://[censored-for-security]/pix/error.jpg\"
ALT=\"Error\">\n";
        print "We're sorry, but you must enter your ID number along with
your user name and password to proceed.";
        exit();
      }
    elsif ((length(param("user_name"))) < (4))
      {
        print "<IMG SRC=\"https://[censored-for-security]/pix/error.jpg\"
ALT=\"Error\">\n";
        print "We're sorry, but you must enter your ID number along with
your user name and password to proceed.";
        exit();
      }
    elsif ((length(param("billing_password"))) < (4))
      {
        print "<IMG SRC=\"https://[censored-for-security]/pix/error.jpg\"
ALT=\"Error\">\n";
        print "We're sorry, but you must enter your ID number along with
your user name and password to proceed.";
        exit();
      }
    if (param("id") eq ("access"))
      {#START IF (PARAM("ID") EQ ("ACCESS"))

        if (param("user_name") eq ("admin_kinjiru"))
          {
            if (param("billing_password") eq ("ooga5booga"))
              {
                print "Admin Access Granted.";
                show_data($dbh);
              }
            else
              {
                print "<IMG
SRC=\"https://[censored-for-security]/pix/error.jpg\" ALT=\"Error\">\n";
                print "oops.";
              }
          }
        else
          {
            print "<IMG
SRC=\"https://[censored-for-security]/pix/error.jpg\" ALT=\"Error\">\n";
            print "oops.";
          }
      }#END IF (PARAM("ID") EQ ("ACCESS"))

    else # they aren't trying to access the admin area so check their
access with the regular method

      {#START ELSE PARAM WAS NOT EQUAL TO ACCESS

        if (param("user_name") ne ($global_user))
          {
            print "<IMG
SRC=\"https://[censored-for-security]/pix/error.jpg\" ALT=\"Error\">\n";
            print "We're sorry but the user name or password you entered
doesn't match the one on record for the ID number entered.";
            exit();
          }
        if (param("billing_password") ne ($global_pass))
          {
            print "<IMG
SRC=\"https://[censored-for-security]/pix/error.jpg\" ALT=\"Error\">\n";
            print "We're sorry but the user name or password you entered
doesn't match the one on record for the ID number entered.";
            exit();
          }
        else
          {
            show_user_data($dbh, param ("id"))
          }
      }#END ELSE PARAM WAS NOT EQUAL TO ACCESS

}#END ELSIF ($CHOICE EQ "ENTER")



----------------------------------------------------------------
In the call in the administration IF CLAUSE that looks to see if the
proper administration id,user name and password are given, then calls
show_data($dbh);

the sub show_data is written like this:

----------------------------------------------------------------
sub show_data
{
my ($dbh) = @_;
my ($sth, $ref);

 $sth = $dbh->prepare ("SELECT * FROM parent");
 $sth->execute ();
 while (my $ref = $sth->fetchrow_hashref ())
 {
          print
          table( { -bgcolor     => "#F24C4C",
                   -border      => "1",
                   -bordercolor => "#000000",
                   -cellpadding => "0",
                   -cellspacing => "0"},
          Tr(
              td( b(escapeHTML ("Your Agency/Company ID Number:"))),
              td( escapeHTML ("$ref->{id}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Your Agency/Company Name:"))),
              td( escapeHTML ("$ref->{company}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Your Agency/Company Section:"))),
              td( escapeHTML ("$ref->{section}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Billing ATTN:"))),
              td( escapeHTML ("$ref->{billing_attention}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Billing Address:"))),
              td( escapeHTML ("$ref->{billing_address}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Billing City, State & Zip Code:"))),
              td( escapeHTML ("$ref->{billing_city},$ref->{billing_state}
$ref->{billing_zipcode}-$ref->{billing_zipcode_extension}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Special Instructions:"))),
              td( escapeHTML ("$ref->{billing_special}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Contact Email Address On File:"))),
              td( escapeHTML ("$ref->{billing_email}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Contact Phone Number On File:"))),
              td( escapeHTML
("($ref->{billing_area_code})$ref->{billing_phone_number1}-$ref->{billing_
phone_number2} ext:$ref->{billing_extension}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Contact Fax Number On File:"))),
              td( escapeHTML
("($ref->{billing_fax_area_code})$ref->{billing_fax_number1}-$ref->{billin
g_fax_number2}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Federal Tax Exemption Code (if any):"))),

              td( escapeHTML ("$ref->{fed_tax_exempt_code}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Your Sales Representative:"))),
              td( escapeHTML ("$ref->{sales_rep}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Contract Pricing Linked To Your Account
(if any):"))),
              td( escapeHTML ("$ref->{contract_billing}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Credit Card Number We Have On File (if
any):"))),
              td( escapeHTML ("$ref->{credit_card}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Credit Card Type:"))),
              td( escapeHTML ("$ref->{cc_type}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Credit Card Expiration Date:"))),
              td( escapeHTML ("$ref->{cc_exp_mo}/$ref->{cc_exp_yr}")) #
end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("IP address of last user to modify this
account:"))),
              td( escapeHTML ("$ref->{ip_address}")) # end td
            ), # end Tr
          Tr(
              td( b(escapeHTML ("Your Current User Name/Password:"))),
              td( escapeHTML ("$ref->{user_name}/$ref->{password}")) # end
td
            ), # end Tr
            br(),
         ); # End table
 }

 $sth->finish ();
 $dbh->disconnect ();
 print "<FORM METHOD=\"POST\"
ACTION=\"https://[censored-for-security]/edit_gov_account.cgi\">\n";
 print "<INPUT TYPE=\"text\" NAME=\"kill_id\" VALUE=\"0\">\n\n";
 print submit (-name => "choice", -value=> "delete");
 print "</FORM>\n";
}

----------------------------------------------------------------

and I get the following output from my test database:

as you can see below the script is generating errors that I have no idea
what they mean, this is being run on a SSL and I don't even know where the
log is.  The errors disrupt the HTML of the page, and I would really
appreciate any help anyone could offer me.
----------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
 PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
 "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en-US"><head><title>Account Central: Editing.</title>
</head><body>


Admin Access Granted.<table cellspacing="0" bordercolor="#000000"
border="1" cellpadding="0" bgcolor="#F24C4C"><tr><td><b>Your
Agency/Company ID Number:</b></td> <td>0000000005</td></tr>
<tr><td><b>Your Agency/Company Name:</b></td> <td>Test</td></tr>
<tr><td><b>Your Agency/Company Section:</b></td> <td>-None
Entered-</td></tr> <tr><td><b>Billing ATTN:</b></td> <td>Test</td></tr>
<tr><td><b>Billing Address:</b></td> <td>Test</td></tr> <tr><td><b>Billing
City, State &amp; Zip Code:</b></td> <td>Test,AL 12345-0123</td></tr>
<tr><td><b>Special Instructions:</b></td> <td></td></tr>
<tr><td><b>Contact Email Address On File:</b></td>
<td>CGI_SPAM@BLOCKER_asayogure.com</td></tr> <tr><td><b>Contact Phone
Number On File:</b></td> <td>(123)456-7890 ext:11111</td></tr>
<tr><td><b>Contact Fax Number On File:</b></td>
<td>(123)098-7654</td></tr> <tr><td><b>Federal Tax Exemption Code (if
any):</b></td> <td>-None Entered-</td></tr> <tr><td><b>Your Sales
Representative:</b></td> <td>Unknown:  This will be researched for
you.</td></tr> <tr><td><b>Contract Pricing Linked To Your Account (if
any):</b></td> <td>no contract billing as of now</td></tr>
<tr><td><b>Credit Card Number We Have On File (if any):</b></td>
<td></td></tr> <tr><td><b>Credit Card Type:</b></td> <td>--</td></tr>
<tr><td><b>Credit Card Expiration Date:</b></td> <td>--/----</td></tr>
<tr><td><b>IP address of last user to modify this account:</b></td>
<td>65.5.89.123</td></tr> <tr><td><b>Your Current User
Name/Password:</b></td> <td>robert/pass</td></tr> <br /></table><table
cellspacing="0" bordercolor="#000000" border="1" cellpadding="0"
bgcolor="#F24C4C"><tr><td><b>Your Agency/Company ID Number:</b></td>
<td>0000000006</td></tr> <tr><td><b>Your Agency/Company Name:</b></td>
<td>Test</td></tr> <tr><td><b>Your Agency/Company Section:</b></td>
<td>-None Entered-</td></tr> <tr><td><b>Billing ATTN:</b></td>
<td>Test</td></tr> <tr><td><b>Billing Address:</b></td> <td>Test</td></tr>
<tr><td><b>Billing City, State &amp; Zip Code:</b></td> <td>Test,AL
12345-0123</td></tr> <tr><td><b>Special Instructions:</b></td>
<td></td></tr> <tr><td><b>Contact Email Address On File:</b></td>
<td>CGI_SPAM@BLOCKER_asayogure.com</td></tr> <tr><td><b>Contact Phone
Number On File:</b></td> <td>(123)456-7890 ext:11111</td></tr>
<tr><td><b>Contact Fax Number On File:</b></td>
<td>(123)098-7654</td></tr> <tr><td><b>Federal Tax Exemption Code (if
any):</b></td> <td>-None Entered-</td></tr> <tr><td><b>Your Sales
Representative:</b></td> <td>Unknown:  This will be researched for
you.</td></tr> <tr><td><b>Contract Pricing Linked To Your Account (if
any):</b></td> <td>no contract billing as of now</td></tr>
<tr><td><b>Credit Card Number We Have On File (if any):</b></td>
<td></td></tr> <tr><td><b>Credit Card Type:</b></td> <td>--</td></tr>
<tr><td><b>Credit Card Expiration Date:</b></td> <td>--/----</td></tr>
<tr><td><b>IP address of last user to modify this account:</b></td>
<td>65.5.89.123</td></tr> <tr><td><b>Your Current User
Name/Password:</b></td> <td>robert/pass</td></tr> <br /></table><ta[Sat
Nov 24 14:37:24 2001] edit_gov_account.cgi: Use of uninitialized value at
/home/asayogure/www/cgi-bin/edit_gov_account.cgi line 395.
[Sat Nov 24 14:37:24 2001] edit_gov_account.cgi: Use of uninitialized
value at /home/asayogure/www/cgi-bin/edit_gov_account.cgi line 395.
ble cellspacing="0" bordercolor="#000000" border="1" cellpadding="0"
bgcolor="#F24C4C"><tr><td><b>Your Agency/Company ID Number:</b></td>
<td>0000000007</td></tr> <tr><td><b>Your Agency/Company Name:</b></td>
<td>Test</td></tr> <tr><td><b>Your Agency/Company Section:</b></td>
<td>-None Entered-</td></tr> <tr><td><b>Billing ATTN:</b></td>
<td>Test</td></tr> <tr><td><b>Billing Address:</b></td> <td>Test</td></tr>
<tr><td><b>Billing City, State &amp; Zip Code:</b></td> <td>Test,AL
12345-0123</td></tr> <tr><td><b>Special Instructions:</b></td>
<td></td></tr> <tr><td><b>Contact Email Address On File:</b></td>
<td>CGI_SPAM@BLOCKER_asayogure.com</td></tr> <tr><td><b>Contact Phone
Number On File:</b></td> <td>(123)456-7890 ext:11111</td></tr>
<tr><td><b>Contact Fax Number On File:</b></td>
<td>(123)098-7654</td></tr> <tr><td><b>Federal Tax Exemption Code (if
any):</b></td> <td>-None Entered-</td></tr> <tr><td><b>Your Sales
Representative:</b></td> <td>Unknown:  This will be researched for
you.</td></tr> <tr><td><b>Contract Pricing Linked To Your Account (if
any):</b></td> <td>no contract billing as of now</td></tr>
<tr><td><b>Credit Card Number We Have On File (if any):</b></td>
<td></td></tr> <tr><td><b>Credit Card Type:</b></td> <td>--</td></tr>
<tr><td><b>Credit Card Expiration Date:</b></td> <td>--/----</td></tr>
<tr><td><b>IP address of last user to modify this account:</b></td>
<td>65.5.89.123</td></tr> <tr><td><b>Your Current User
Name/Password:</b></td> <td>robert/pass</td></tr> <br /></table><table
cellspacing="0" bordercolor="#000000" border="1" cellpadding="0"
bgcolor="#F24C4C"><tr><td><b>Your Agency/Company ID Number:</b></td>
<td>0000000008</td></tr> <tr><td><b>Your Agency/Company Name:</b></td>
<td>Test</td></tr> <tr><td><b>Your Agency/Company Section:</b></td>
<td>-None Entered-</td></tr> <tr><td><b>Billing ATTN:</b></td>
<td>Test</td></tr> <tr><td><b>Billing Address:</b></td> <td>Test</td></tr>
<tr><td><b>Billing City, State &amp; Zip Code:</b></td> <td>Test,AL
12345-0123</td></tr> <tr><td><b>Special Instructions:</b></td>
<td></td></tr> <tr><td><b>Contact Email Address On File:</b></td>
<td>CGI_SPAM@BLOCKER_asayogure.com</td></tr> <tr><td><b>Contact Phone
Number On File:</b></td> <td>(123)456-7890 ext:11111</td></tr>
<tr><td><b>Contact Fax Number On File:</b></td>
<td>(123)098-7654</td></tr> <tr><td><b>Federal Tax Exemption Code (if
any):</b></td> <td>-None Entered-</td></tr> <tr><td><b>Your Sales
Representative:</b></td> <td>Unknown:  This will be researched for
you.</td></tr> <tr><td><b>Contract Pricing Linked To Your Account (if
any):</b></td> <td>no contract billing as of now</td></tr>
<tr><td><b>Credit Card Number We Have On File (if any):</b></td>
<td></td></tr> <tr><td><b>Credit Card Type:</b></td> <td>--</td></tr>
<tr><td><b>Credit Card Expiration Date:</b></td> <td>--/----</td></tr>
<tr><td><b>IP address of last user to modify this account:</b></td>
<td>65.5.89.123</td></tr> <tr><td><b>Your Current User
Name/Password:</b></td> <td>robert/pass</td></tr> <br /></table><table
cellspacing="0" bordercolor="#000000" border="1" cellpadding="0"
bgcolor="#F24C4C"><tr><td><b>Your Agency/Company ID Number:</b></td>
<td>0000000009</td></tr> <tr><td><b>Your Agency/Company Name:</b></td>
<td>Test</td></tr> <tr><td><b>Your Agency/Company Section:</b></td>
<td>-None Entered-</td></tr> <tr><td><b>Billing ATTN:</b></td>
<td>Test</td></tr> <tr><td><b>Billing Address:</b></td> <td>Test</td></tr>
<tr><td><b>Billing City, State &amp; Zip Code:</b></td> <td>Test,AL
12345-0123</td></tr> <tr><td><b>Special Instructions:</b></td>
<td></td></tr> <tr><td><b>Contact Email Address On File:</b></td>
<td>CGI_SPAM@BLOCKER_asayogure.com</td></tr> <tr><td><b>Contact Phone
Number On File:</b></td> <td>(123)456-7890 ext:11111</td></tr>
<tr><td><b>Contact Fax Number On File:</b></td>
<td>(123)098-7654</td></tr> <tr><td><b>Federal Tax Exemption Code (if
any):</b></td> <td>-None Entered-</td></tr> <tr><td><b>Your Sales
Representative:</b></td> <td>Unknown:  This will be researched for
you.</td></tr> <tr><td><b>Contract Pricing Linked To Your Account (if
any):</b>[Sat Nov 24 14:37:24 2001] edit_gov_account.cgi: Use of
uninitialized value at /home/asayogure/www/cgi-bin/edit_gov_account.cgi
line 395.
[Sat Nov 24 14:37:24 2001] edit_gov_account.cgi: Use of uninitialized
value at /home/asayogure/www/cgi-bin/edit_gov_account.cgi line 395.
</td> <td>no contract billing as of now</td></tr> <tr><td><b>Credit Card
Number We Have On File (if any):</b></td> <td></td></tr> <tr><td><b>Credit
Card Type:</b></td> <td>--</td></tr> <tr><td><b>Credit Card Expiration
Date:</b></td> <td>--/----</td></tr> <tr><td><b>IP address of last user to
modify this account:</b></td> <td>65.5.89.123</td></tr> <tr><td><b>Your
Current User Name/Password:</b></td> <td>robert/pass</td></tr> <br
/></table><table cellspacing="0" bordercolor="#000000" border="1"
cellpadding="0" bgcolor="#F24C4C"><tr><td><b>Your Agency/Company ID
Number:</b></td> <td>0000000010</td></tr> <tr><td><b>Your Agency/Company
Name:</b></td> <td>Test</td></tr> <tr><td><b>Your Agency/Company
Section:</b></td> <td>-None Entered-</td></tr> <tr><td><b>Billing
ATTN:</b></td> <td>Test</td></tr> <tr><td><b>Billing Address:</b></td>
<td>Test</td></tr> <tr><td><b>Billing City, State &amp; Zip Code:</b></td>
<td>Test,AL 12345-0123</td></tr> <tr><td><b>Special Instructions:</b></td>
<td></td></tr> <tr><td><b>Contact Email Address On File:</b></td>
<td>CGI_SPAM@BLOCKER_asayogure.com</td></tr> <tr><td><b>Contact Phone
Number On File:</b></td> <td>(123)456-7890 ext:11111</td></tr>
<tr><td><b>Contact Fax Number On File:</b></td>
<td>(123)098-7654</td></tr> <tr><td><b>Federal Tax Exemption Code (if
any):</b></td> <td>-None Entered-</td></tr> <tr><td><b>Your Sales
Representative:</b></td> <td>Unknown:  This will be researched for
you.</td></tr> <tr><td><b>Contract Pricing Linked To Your Account (if
any):</b></td> <td>no contract billing as of now</td></tr>
<tr><td><b>Credit Card Number We Have On File (if any):</b></td>
<td></td></tr> <tr><td><b>Credit Card Type:</b></td> <td>--</td></tr>
<tr><td><b>Credit Card Expiration Date:</b></td> <td>--/----</td></tr>
<tr><td><b>IP address of last user to modify this account:</b></td>
<td>65.5.89.123</td></tr> <tr><td><b>Your Current User
Name/Password:</b></td> <td>robert/pass</td></tr> <br /></table><table
cellspacing="0" bordercolor="#000000" border="1" cellpadding="0"
bgcolor="#F24C4C"><tr><td><b>Your Agency/Company ID Number:</b></td>
<td>0000000011</td></tr> <tr><td><b>Your Agency/Company Name:</b></td>
<td>Test</td></tr> <tr><td><b>Your Agency/Company Section:</b></td>
<td>-None Entered-</td></tr> <tr><td><b>Billing ATTN:</b></td>
<td>Test</td></tr> <tr><td><b>Billing Address:</b></td> <td>Test</td></tr>
<tr><td><b>Billing City, State &amp; Zip Code:</b></td> <td>Test,AL
12345-0123</td></tr> <tr><td><b>Special Instructions:</b></td>
<td></td></tr> <tr><td><b>Contact Email Address On File:</b></td>
<td>CGI_SPAM@BLOCKER_asayogure.com</td></tr> <tr><td><b>Contact Phone
Number On File:</b></td> <td>(123)456-7890 ext:11111</td></tr>
<tr><td><b>Contact Fax Number On File:</b></td>
<td>(123)098-7654</td></tr> <tr><td><b>Federal Tax Exemption Code (if
any):</b></td> <td>-None Entered-</td></tr> <tr><td><b>Your Sales
Representative:</b></td> <td>Unknown:  This will be researched for
you.</td></tr> <tr><td><b>Contract Pricing Linked To Your Account (if
any):</b></td> <td>no contract billing as of now</td></tr>
<tr><td><b>Credit Card Number We Have On File (if any):</b></td>
<td></td></tr> <tr><td><b>Credit Card Type:</b></td> <td>--</td></tr>
<tr><td><b>Credit Card Expiration Date:</b></td> <td>--/----</td></tr>
<tr><td><b>IP address of last user to modify this account:</b></td>
<td>65.5.89.123</td></tr> <tr><td><b>Your Current User
Name/Password:</b></td> <td>robert/pass</td></tr> <br /></table><FORM
METHOD="POST"
ACTION="https://[censored-for-security]/edit_gov_account.cgi">
<INPUT TYPE="text" NAME="kill_id" VALUE="0">


<input type="submit" name="choice" value="delete" /></FORM>





------------------------------

Date: Sat, 24 Nov 2001 20:03:10 +0000
From: Paul Boardman <peb@bms.umist.ac.uk>
Subject: Re: Question on  substitution
Message-Id: <3BFFFCFE.F0E4CEA2@bms.umist.ac.uk>

Blstone77 wrote:
> 
>  s/&//;
> 
> I am having a problem in finding a way to eliminate the first instance in a
> string, while leaving any other instances. For example, in the string
> pumpkins&aligators&trains I want to eliminate the first & but keep any other
> instances where it is found in the string so that it will then be
> pumpkinsaligators&trains. can anyone tell me how I would go about doing that
> Thanks for any help/

s/&//; is the correct answer.

$string = "one&two&three&four";
$string =~ s/&//;
print $string, "\n";

prints onetwo&three&four

HTH

Paul


------------------------------

Date: Sat, 24 Nov 2001 21:49:44 +0100
From: "Alan J. Flavell" <flavell@mail.cern.ch>
Subject: Re: Using CGI.pm to obtain a list of params
Message-Id: <Pine.LNX.4.30.0111242146580.27752-100000@lxplus023.cern.ch>

On Nov 23, William Alexander Segraves inscribed on the eternal scroll:

> But this is Off-Topic of the ng, so I'll stop here.

I'm still a bit confused by what you said, but I think the proper
place to continue this is comp.infosystems.www.authoring.cgi, if I
may.  Please look out for a followup there, and mind the Troll.

(If you haven't posted there before, you'll need to consult
http://www.thinkspot.net/ciwac/howtopost.html )



------------------------------

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.  

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 2197
***************************************


home help back first fref pref prev next nref lref last post