[25336] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 7581 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Dec 28 03:05:47 2004

Date: Tue, 28 Dec 2004 00: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)

Perl-Users Digest           Tue, 28 Dec 2004     Volume: 10 Number: 7581

Today's topics:
    Re: [OT] Perl CGI script using Win::ODBC module - faile <matthew.garrish@sympatico.ca>
    Re: copying values from a hash into CGI.pm via tied has <Juha.Laiho@iki.fi>
    Re: Help needed for perl rookie <see_sig@invalid>
    Re: Help needed for perl rookie <jkeen_via_google@yahoo.com>
        how Encode::Hanextra work? ke.kewen@gmail.com
    Re: how to delete files that create date <=20041210 <joe@inwap.com>
    Re: Is zero even or odd? (Matthew Russotto)
    Re: Is zero even or odd? <a.newmane.remove@eastcoastcz.com>
    Re: Is zero even or odd? <dseaman@no.such.host>
    Re: Is zero even or odd? <no_mail_no_spam@yahoo.com>
    Re: Loading Modules with "require" <noreply@gunnar.cc>
    Re: Loading Modules with "require" <joe@inwap.com>
    Re: Loading Modules with "require" <joe@inwap.com>
    Re: Loading Modules with "require" <joe@inwap.com>
        Multiple submit actions. <sam.wun@authtec.com>
    Re: WINSHARED, my Perl script <dontmewithme@got.it>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Mon, 27 Dec 2004 23:55:08 -0500
From: "Matt Garrish" <matthew.garrish@sympatico.ca>
Subject: Re: [OT] Perl CGI script using Win::ODBC module - failed login on
Message-Id: <JG5Ad.13847$nV.433556@news20.bellglobal.com>


<byoukstetter@hotmail.com> wrote in message 
news:1104186522.138162.41690@f14g2000cwb.googlegroups.com...
> Ok I have an issue with a CGI script that I have written in Perl using
> the Win::ODBC module for db access.  I have a System DSN that I have
> setup on the server and I want the script to use that ODBC DSN for
> security reasons.  The bit something like:
>
> $DSN = "vrs";
> if (!($db = new Win32::ODBC($DSN))){
> print "Content-type: text/html\n\n";
> print "Error connecting to $DSN\n";
> print "Error: " . Win32::ODBC::Error() . "\n";
> exit;
> }
>
> From all the examples I've seen, this work.  However, when the script
> is run I always get an error like: "the user '(null)' is not
> associated with  a trusted SQL server connection".
>

If I understand you correctly, it sounds like you haven't specified the 
username and password for the DSN properly in the ODBC manager (i.e., there 
is no default user and password for that DSN). Go to Settings -- Control 
Panel -- Admin Tools -- ODBC Settings (or something similar depending on 
your version of Windows) and trying testing the connection. If you can't 
connect, then go over the settings and see what you've missed. Also, make 
sure that you've set it up as a System DSN and not a User DSN.

It definitely doesn't sound like a Perl problem, though. I would personally 
recommend you switch to the DBI and DBD::ODBC modules, however, as support 
for Win32::ODBC is suspect.

Matt 




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

Date: Tue, 28 Dec 2004 07:42:31 +0000 (UTC)
From: Juha Laiho <Juha.Laiho@iki.fi>
Subject: Re: copying values from a hash into CGI.pm via tied hash reference
Message-Id: <cqr2p7$64c$1@ichaos.ichaos-int>

"Paul Lalli" <mritty@gmail.com> said:
>"Matt Garrish" <matthew.garrish@sympatico.ca> wrote in message
>news:v6Xzd.12800$Tn1.389068@news20.bellglobal.com...
>>
>> Fair enough. I was thinking that keys and values wouldn't necessarily
>> return in the same order when I wrote that, but learned something new
>> today (I'd still take a loop over a hash slice for clarity, though).
>> And fyi, the time disparity between the two is minimal, but foreach
>> is slightly faster.
>
>Just to be clear, keys, values, and each all return the hash's elements
>in the same order.  That's a guarantee.  What that order *is* however,
>is unknowable (without digging into the internals of perl itself, I
>imagine).

Hmm.. is it also so that the order is not necessarily consistent for
two successive runs of the same program? From perldelta for 5.8.1:

: Mainly  due to security reasons, the ``random ordering'' of hashes has
: been  made  even  more  random.  Previously  while  the  order of hash
: elements  from keys(), values(), and each() was essentially random, it
: was still repeatable. Now, however, the order varies between different
: runs of Perl.
: 
: Perl  has  never  guaranteed  any  ordering  of the hash keys, and the
: ordering has already changed several times during the lifetime of Perl
: 5.  Also,  the ordering of hash keys has always been, and continues to
: be, affected by the insertion order.

So, the order is constant for a single run of the program, but not
repeatable in consecutive runs.
-- 
Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ 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: Mon, 27 Dec 2004 22:34:20 -0500
From: Bob Walton <see_sig@invalid>
Subject: Re: Help needed for perl rookie
Message-Id: <41d0d3a3$1_3@127.0.0.1>

GRLCOPM wrote:

> I am new to perl, but so far have had decent success in writing/modifying
> code to do what I want to do. However I am stuck trying to modify the
> following code. I am sure the solution is quite simple, but I can't
> completely figure out what this piece of code does. I think it is just
> matching up a data pattern but this is an area I am unfamiliar with.
> 
> All I want to do is change the format of the data file from example #1 to
> example #2 and need this section of code to work with the new format. I
> would be grateful for any help provided in understanding what this piece of
> code does and suggestions on the modification needed.
> 
> If more information or a larger chunk of the code is needed please let me
> know and I will provide.
> 
> EXAMPLE #1 - Current format of data file:
> 0000000050 20041227 0000000003 'my-page.shtml'
> 0000000054 20041227 0000000004 'another-page.shtml'
> 0000000020 20041227 0000000003 'yet-another-page.shtml'
> 
> EXAMPLE #2 - New format of data file:
> 0000000050|20041227|0000000003|my-page.shtml
> 0000000054|20041227|0000000004|another-page.shtml
> 0000000020|20041227|0000000003|yet-another-page.shtml

Your example #2 is in "pipe-delimited" form -- the best way to 
split it apart is with the split() function, as in:

    ($acc,$day,$dayacc,$uri)=split /\|/,$line;

For that, using a regexp ("regular expression") is a bit 
cumbersome and slow in comparison.  See:

    perldoc -f split

 ...

>   if (($acc,$day,$dayacc,$uri) = ($line =~ /^(\d+) (\d+) (\d+) '(\S+)'$/)) {

Regarding your question of what the regexp does, please see the 
docs that come with Perl:

    perldoc perlre
    perldoc perlretut
    perldoc perlrequick
    perldoc perlreref
    perldoc perlop

and probably some more.  Hint:  Type the above at a command 
prompt on your computer.  You might also want to check out:

    http://www.perlpod.com
    http://learn.perl.org

or a good book on the subject like "Mastering Regular Expressions".
 ...
> PM

-- 
Bob Walton
Email: http://bwalton.com/cgi-bin/emailbob.pl


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---


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

Date: Tue, 28 Dec 2004 03:59:08 GMT
From: Jim Keenan <jkeen_via_google@yahoo.com>
Subject: Re: Help needed for perl rookie
Message-Id: <gS4Ad.5907$sh5.5677@trndny08>

GRLCOPM wrote:
> I am new to perl, 


For your future reference:  Read the posting guidelines for this Usenet 
news group:  http://mail.augustmail.com/~tadmc/clpmisc.shtml

As the guidelines advise, put your real Perl subject in the "Subject" 
line.  There's no need to apologize for being a rookie provided you make 
a genuine effort to solve the problem yourself prior to posting.  But 
the fact that you're new to Perl, should you wish to include it, is best 
included in the body of your posting.  Don't take up valuable Net real 
estate by wasting it on the Subject line.  HTH.

Jim Keenan


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

Date: 27 Dec 2004 19:19:33 -0800
From: ke.kewen@gmail.com
Subject: how Encode::Hanextra work?
Message-Id: <1104203973.744485.209370@z14g2000cwz.googlegroups.com>

I use ActivePerl 5.8.6, and install the Encode::Hanextra module through
PPM, but the perl couldn't find the codepage of "gb18030".

I find the next three lines in Encode\Config.pm:
#'big5plus'           => 'Encode::HanExtra',
#'euc-tw'             => 'Encode::HanExtra',
#'gb18030'            => 'Encode::HanExtra',
after un-comment these lines. "gb18030" could work, but the alias
"GB-18030" couldn't work.
Is there some bug? or I do something wrong?
Thanks very much.



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

Date: Mon, 27 Dec 2004 23:16:38 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: how to delete files that create date <=20041210
Message-Id: <evudnaJe6sbElUzcRVn-sg@comcast.com>

sonet wrote:
> I can scan the dir and get all file create date.
> if create date<=20041210 to delete this file.

1) Convert "20041210" to seconds-past-the-epoch by using
    timelocal or other module.

2) Check if the file's mtime is less than this value.
    (That's assuming that you really meant to use the file's
    modification time instead of creation date.)

Or use
    -M $_ > 17.0 and unlink $_ || warn "unlink($_):$!" foreach <*>;

	-Joe


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

Date: Mon, 27 Dec 2004 20:58:35 -0600
From: russotto@grace.speakeasy.net (Matthew Russotto)
Subject: Re: Is zero even or odd?
Message-Id: <upudnVHM6_xGVk3cRVn-sQ@speakeasy.net>

In article <t4rss0duo9eho2urcsibtq302e3s3edqkr@4ax.com>,
vonroach  <hadrainc@earthlink.net> wrote:
>On Fri, 24 Dec 2004 19:46:25 GMT, "Nicholas O. Lindan" <see@sig.com>
>wrote:
>
>>0^0 is a mess in either system.
>
>A meaningless mess.  As Pauli might say `it isn't even wrong'. And
>Heisenberg would add a `pile of crap'.

Well, 0^0 is a mess.  But lim x->0 0^x is well defined.


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

Date: Mon, 27 Dec 2004 20:44:14 -0800
From: "Alfred Z. Newmane" <a.newmane.remove@eastcoastcz.com>
Subject: Re: Is zero even or odd?
Message-Id: <33c6l6F3umr2pU1@individual.net>

vonroach wrote:
> On Fri, 24 Dec 2004 07:52:38 -0800, "Alfred Z. Newmane"
> <a.newmane.remove@eastcoastcz.com> wrote:
>
>> vonroach wrote:
>>> On Wed, 22 Dec 2004 12:07:32 -0500, Shawn Corey
>>> <shawn.corey@sympatico.ca> wrote:
>>>
>>>> vonroach wrote:
>>>>>  Then infinity is undefined?
>>>
>>> I did not write this. Please be more careful.
>>
>> Yes you did.
>> See below.
>>
>
>>
>> From: vonroach <hadrainc@earthlink.net>

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

>> Newsgroups:
>>
sci.math,comp.soft-sys.matlab,sci.physics,alt.math.undergrad,rec.puzzles
>> ,sci.astro,sci.electronics.design,comp.lang.perl.misc
>> Subject: Re: Is zero even or odd?
>> Organization: n/a
>> Message-ID: <fa2js0pd4v6o2cp1c1j8kkn0vubhgaf7lu@4ax.com>
>> References: [...snipped...too...many...]
>> MIME-Version: 1.0
>> Content-Type: text/plain; charset=us-ascii
>> Content-Transfer-Encoding: 7bit
>> Lines: 11
>> Date: Wed, 22 Dec 2004 14:49:45 GMT
>> NNTP-Posting-Host: 4.131.126.33
>> X-Complaints-To: abuse@earthlink.net
>> X-Trace: newsread3.news.pas.earthlink.net 1103726985 4.131.126.33
>> (Wed, 22 Dec 2004 06:49:45 PST)
>> NNTP-Posting-Date: Wed, 22 Dec 2004 06:49:45 PST
>>
>> On Tue, 21 Dec 2004 10:39:22 -0500, "Richards Noah \(IFR LIT MET\)"
>> <Noah.Richards@infineon.com> wrote:
>>
>>> You guys are arguing two different things.  The argument that 0/0
>>> is the set of all integers/reals/whatever you are using is the set
>>> theory response to the question.  However, the more commonly used
>>> form is the algebraicly accepted argument that states that division
>>> is a function of the forms: Z / Z -> Q, R / R -> R, etc.  In this
>>> definition, division by 0 is undefined for all Z or R, including 0.
>>> So, you are both correct, but arguing different things.
>>
>> Then infinity is undefined?

-------------------------- 
Above your reply ot him and below was my text, so dont mix the above and
below - I should of put a delimiter.

>> What are you trying to pull here?
>>
> Alfy, there is nothing in your daffy post to attribute that remark to
> me.

Huh?! Did you miss the header line that says:

   From: vonroach <hadrainc@earthlink.net>

What do you mean it's not from you. THe Mesage ID's are in the header
too btw. I don't know why you continue to out right lie about this,
especially when the evidence is so glaringly /self/ evident.

> Did you skip elementary school the day they discussed the meaning
> of a question mark at the end of a sentence _?_

It's still your words. What thehell are you trying top pull here. You
lied. plain and simple. You wrote the text. the original ALSo has a
question mark too

> To throw a beam of light into the darkness within your skull, I will
> add a declarative sentence. Division by 0 is undefined and
> meaningless.  Infinity is an ambiguous term that must be defined to
> have a specific meaning.  You will encounter one meaning if you ever
> attempt to learn differential calculus.

Now you are turning this back to div by zero. I have always said it was
undefined when dividing by zero, so either /you/ are incridibly daft or
sleep deprived, or you are a troll jsut trying to start a fight. Lying
and trying to change the subject when you've been caught in a lie wont
help you.




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

Date: Tue, 28 Dec 2004 04:56:23 +0000 (UTC)
From: Dave Seaman <dseaman@no.such.host>
Subject: Re: Is zero even or odd?
Message-Id: <cqqp1n$rgb$2@mailhub227.itcs.purdue.edu>

On Mon, 27 Dec 2004 20:58:35 -0600, Matthew Russotto wrote:
> In article <t4rss0duo9eho2urcsibtq302e3s3edqkr@4ax.com>,
> vonroach  <hadrainc@earthlink.net> wrote:
>>On Fri, 24 Dec 2004 19:46:25 GMT, "Nicholas O. Lindan" <see@sig.com>
>>wrote:
>>
>>>0^0 is a mess in either system.
>>
>>A meaningless mess.  As Pauli might say `it isn't even wrong'. And
>>Heisenberg would add a `pile of crap'.

> Well, 0^0 is a mess.  But lim x->0 0^x is well defined.

No, it isn't.  That limit does not exist.
But 0^0 does exist and has nothing to do with limits.


-- 
Dave Seaman
Judge Yohn's mistakes revealed in Mumia Abu-Jamal ruling.
<http://www.commoncouragepress.com/index.cfm?action=book&bookid=228>


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

Date: Mon, 27 Dec 2004 23:30:20 -0600
From: RP <no_mail_no_spam@yahoo.com>
Subject: Re: Is zero even or odd?
Message-Id: <33c95pF3vc9n9U1@individual.net>



George Dishman wrote:
> "John Fields" <jfields@austininstruments.com> wrote in message 
> news:h8c0t0dvf5fq2ig0uqgaihf89ovrikmsn2@4ax.com...
> 
>>On Mon, 27 Dec 2004 15:47:32 -0000, "George Dishman"
>><george@briar.demon.co.uk> wrote:
>>
>>
>>>"John Fields" <jfields@austininstruments.com> wrote in message
>>>news:2dvvs0ppsmtl1tgcpv4rp4fd8a5cko8bak@4ax.com...
>>>
>>>>On Mon, 27 Dec 2004 02:23:11 +0100, Michael Mendelsohn
>>>><invalid@msgid.michael.mendelsohn.de> wrote:
>>>>
> 
> <snip>
> 
>>>>Your circuit:
>>>>
>>>>
>>>>        +---------------------(V)----+
>>>>        |                            |
>>>>(-)-----o-------[__R__]---o---(A)----o--------(+)
>>>>        |____________________________|
>>>>               the short
>>>>
>>>>contrives to hide the resistance while purporting to use Ohms law to
>>>>determine the resistance so, quite clearly, the results obtained will
>>>>be nonsensical.
> 
> <snip second circuit>
> 
>>In the above circuit, as in the previous, the instrumentation is
>>assumed to be perfect, so there will be no current required to read
>>the voltage.
> 
> 
> If the instrumentation is assumed to be perfect, there
> will be no voltage dropped across the ammeter and hence
> the first circuit (above) is equally valid.
> 
> 
>>If that's not satisfactory then a wheatstone bridge can
>>be used to measure the voltage with no regard given to the impedance
>>of the voltmeter.
> 
> 
> Agreed, it is easier to achieve it in reality that
> way, but for the purposes of considering 0/0 that
> is academic.
> 
> 
>>>Neither circuit gives both readings accurately.
>>
>>---
>>Knowing the meter resistance, the second circuit does.
> 
> 
> The point was, knowing the meter resistance,
> both circuits do.
> 
> 
>>--- 
>>
>>><snip proof that 1=1>
>>>
>>>If you want to use an Ohms Law example to
>>>understand this, realise that when you try to
>>>calculate 0/0, you are asking "what resistance
>>>will allow zero current to flow when zero voltage
>>>is applied. The answer is any resistance.
>>
>>---
>>Yes, and that's why I wouldn't ordinarily use Ohm's law to try to
>>prove that 0/0 = 1.
> 
> 
> Neither would I, but I'm not the OP.
> 
> 
>>In this case, however, to indicate to the OP that
>>when the current through the resistor and the voltage across it are
>>both numerically equal, the value of the resistance will be one ohm
>>and will remain one ohm as the voltage across the resistance goes to
>>zero.
> 
> 
> Sure, but as has been pointed out, if you start
> by assuming any other value of resistance, the
> numerical value of the ratio also remains constant
> at that other value. You have simply illustrated a
> particular example, not proven any general rule.
> 
> 
>>>Equally, you could ask what current flowing through a
>>>superconductor produces zero volts and again the
>>>answer is any current. Hence 0/0 can have any
>>>value and it is therefore undefined.
>>
>>---
>>The very notion of a superconductor renders Ohm's law unfit to
>>characterized it,
> 
> 
> Not at all, R is defined as V/I and for any current
> (below the level that destroys the superconduction
> obviously), V=0 hence R=0.
> 
> 
>>so saying that 0/0 can have any value because Ohm's
>>law doesn't work for superconductors is nonsensical.
> 
> 
> I wouldn't have chosen Ohms Law myself but since that
> is the topic, you should at least get the arguments
> right.
> 
> George

Though you are both essentially claiming, for the sake of argument, 
that the resistor has fixed resistance, and arguing from this premise 
that resistance isn't therefore undefined under any conditions, even 
under the condition 0/0, this is a fallacy, since the premise is 
false. OTOH your conclusion is accidentally correct.

Resistance is not determinate in reality, but varies with current, 
some resistors increasing with current and some decreasing with 
current. Thus under the condition E=0 and I=0, we must have R=0 orr 
R=oo. So the solution to the argument about the value of 0/0 seems to 
be 0/0=0 orr 0/0=oo. That is, the resistance isn't (for instance) 
10ohms under these conditions, even though it may be 10ohms when 1V is 
applied to it.

This is however just an idealistic solution, since in reality it is 
also true that E is never precisely zero. If it were, then the 
universe will have ended and there would be no discussion to be had :)

Richard Perry



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

Date: Tue, 28 Dec 2004 06:10:46 +0100
From: Gunnar Hjalmarsson <noreply@gunnar.cc>
Subject: Re: Loading Modules with "require"
Message-Id: <33c8gjF3uvjahU1@individual.net>

amerar@iwc.net wrote:
> I sort of see who that works.  Are you saying that to have the values
> in an 'include' change when it is executed more than once, I need to
> basically make that include a packaged subroutine?  Passing to it any
> values used within and receiving any values returned from?

Not saying you *need* to do it that way, but I think it's the best 
approach. For instance, you *can* do it without a separate package:

## Addlib.pl
sub add {
     my $arg = shift;
     return $arg + 4;
}
1;

## test.pl
#!/usr/bin/perl
use strict;
use warnings;

require 'Addlib.pl';
my ($x, $y);

# First calculation
$y = 5;
$x = add($y);
print "\$x = $x\n"; # prints 9

# Second calculation
$y = 3;
$x = add($y);
print "\$x = $x\n"; # prints 7

__END__

> But, here you are dealing with a single value.   How would you code
> thing that deals with arrays, and things like this:
> 
> $sel = $dbh->prepare("SELECT table_name, proper_name, acronym FROM
> table_data $where");
> $sel->execute() || die "Select of table names failed: ",
> $dbh->errstr, "\n";
> while (($table, $name, $acr) = $sel->fetchrow_array()) {
> $tables{$table} = $name;
>    }
>    $sel->finish;

You can pass multiple arguments, which can be objects, and return 
multiple values. Arrays are preferrably passed as array references.

Did you study "perldoc perlsub", btw?

-- 
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl


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

Date: Mon, 27 Dec 2004 23:27:39 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Loading Modules with "require"
Message-Id: <NfmdnfQk4vZyl0zcRVn-2w@comcast.com>

amerar@iwc.net wrote:
> Hi All,
> 
> I'm trying to figure out how Perl operates regarding the 'require'
> function.
> 
> Say I have the following code in an included library because several
> modules use the code:

You're going about it all wrong.

Don't put code in a module; but function definitions in the module.
Then call the function with the appropriate arguments - do not
in-line the code over and over.

Put this in My_module.pm:

   sub my_database_function_1 {
     my $x_table = shift;
      ... bunch of statements that use $x_table go here
     return;
   }

Then in main.pl:
   use My_module;
   @data = my_database_function_1("table1");

And in foo.pl:
   use My_module;
   @results = my_datbase_function_1("foo");


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

Date: Mon, 27 Dec 2004 23:31:17 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Loading Modules with "require"
Message-Id: <1-GdnUZ-b45VlkzcRVn-2Q@comcast.com>

amerar@iwc.net wrote:
> If I can ask a stupid question:  If the module is loaded only once with
> 'require', then what good is it?

If the module only defines subroutines and declares constants, then
loading it only once is most appropriate.


> If I have several procedures that use the same code

You should have several procedures that call the same user-defined
functions.

> The idea is to have code that you can make generic and use in many
> different scripts, load as many times as you need to, etc......

That's exactly what you get when you write user-defined functions
instead of just copy-and-paste in-line code.
	-Joe


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

Date: Mon, 27 Dec 2004 23:49:47 -0800
From: Joe Smith <joe@inwap.com>
Subject: Re: Loading Modules with "require"
Message-Id: <06qdnQa-KuqGjUzcRVn-1A@comcast.com>

amerar@iwc.net wrote:
> I sort of see who that works.  Are you saying that to have the values
> in an 'include' change when it is executed more than once, I need to
> basically make that include a packaged subroutine?

No.  You do know how subroutines and functions work, don't you?

You define a function once, then invoke the function one or more
times.  Each invocation can use a different set of arguments,
and the function can return zero, one or many values.  (It can also
change global variables, but that's often not good programming practice.)

> Passing to it any values used within and receiving any values returned from?

Exactly, if by 'it' you mean a user-defined function (and not the name
of a perl module).

> But, here you are dealing with a single value.   How would you code
> thing that deals with arrays, and things like this:

Have you read the part in the Perl documentation where it talks
about @_ (the special array used for passing function arguments)?
Also look at the documentation for shift(), which acts differently
inside a function definition than outside.
	-Joe


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

Date: Tue, 28 Dec 2004 15:57:49 +0800
From: sam <sam.wun@authtec.com>
Subject: Multiple submit actions.
Message-Id: <cqr57k$1ld7$1@news.hgc.com.hk>

Hi,

I tried to create a form which embedded with another form, thus I expect 
the second submit button will call the second cgi script, the main 
submit button will call the main cgi script seperately.

eg.
print "<Form action=main.cgi>\n";
print "<table>\n";
print "<td><form action=second.cgi>\";
print "<input type=submit value=\"Outlets\">\n";
print "</form></td>\n";
print "</table>\n";
print "<td><form action=queryl.pl><input type=submit 
value=\"MainQuery\"></form>\n";

in the above coding, pressed the MainQuery submit button actually called 
to main.cgi script instead of query1.pl.

How can I change this?

Thanks
Sam


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

Date: Tue, 28 Dec 2004 05:25:12 GMT
From: Larry <dontmewithme@got.it>
Subject: Re: WINSHARED, my Perl script
Message-Id: <dontmewithme-4A8F43.06240528122004@twister2.tin.it>

In article <dontmewithme-53BE6B.01040828122004@twister1.tin.it>,
 Larry <dontmewithme@got.it> wrote:

> WINSHARED shares your files in your "shared" folder on windows:
> 
> http://www.redangel.it/click_file.asp?m=1344&l=7 
> 
> Give it a shot and check the code out!
> 
> thanks!

you can always see the code here: 
http://www.theartofweb.netfirms.com/cgi-bin/bbsmart/bbsmart.cgi?DO=showto
pic&FORUM_ID=3&TOPIC_ID=39


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

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 7581
***************************************


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