Hi,
I have a simple question: how do I access an array in an array?
@array = (@array1, array2); ### unless this is wrong...
the idea behind it is, that I have a long list, and want to put all
25 entries in a seperate array in that big array. later on I want to
be able to read one
you need to learn about references.
read the:
perldoc perllol
here is the jist though.
@all = (\@array1, \@array2 ... ); # ... so on
to access first array and first element:
$all[0]-[0]; # i think or is it: $all[0][0]
-Original Message-
From: alex [mailto:[EMAIL PROTECTED]]
Hi,
I've read http://webmaster.indiana.edu/perl56/pod/perllol.html and
this cleared some points. :)
still I do have some problems... the assignment of values to arrays
in arrays works, but I gave the arrays in the array names:
@array = \(@names, @school, @othercrap);
so $array[2][3]
Hi David,
While I raise quite a few issues here, I have to say that I've rarely seen
anyone present a CGI.pm alternative that supports uploads. I'm quite
impressed, so keep that in mind while I pick it apart :)
I'll ignore anything I may have covered in my discussion about the previous
Hello List,
Here is my issue. Trying to use perl/cgi script to build a table in a form. Building
the table is straight forward as the code snippet below works. The problem is -- How
do I set up the code to align cell 1 right and align cell 2 left? Or more generally
how do I set up the code
First, I have to declare that below are my own opinion only.
Second, I would like to give you a pure HTML sample for a 2x2 table.
table border=0 cellborder=0 width=100% cellspacing=1 cellpadding=1
!-- border and cellborder are for NS and IE --
tr
td valign=topdiv align=leftCol 1 Row 1/div/td
On Friday, July 5, 2002, at 08:31 , Connie Chan wrote:
[..]
If you want to know what 'fields' inside %Data :
@DataKeys = keys(%Data);
print @DataKeys; # So you get Code, Birth, Name...
# However, the elements order in @DataKeys is not base
#on how's the order you create your key field in
Hi all,
I want to make a Perl script that generates a web page and prints it on the
screen.
I want to include an SSI statement in that page.
If I print :
!--#include virtual=/cgi-bin/counter.pl --
in the script file, this doesn't include the SSI in the page.
I don't want to create another
Hi all,
I've made a script that should print something if the page referer is my
site, and something else if it is not.
The security is not a problem. I know that the referer can be set by some
browsers.
The problem is that some browsers like links (under Linux) don't offer this
environment
Please anybody I am begging now. Please help...
This is a mess now... I even have no concept on how to start.
I will working on something like this
There are 2 interface as input. One is a Web interface, which will accept
HTML tag and plain text by POST method, but by GET
- Original Message -
From: Jenda Krynicky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 03, 2002 5:05 PM
Subject: Re: Shopping cart 2
From: anthony [EMAIL PROTECTED]
what if the customer does NOT use cookies, i think you should make a
file foreach custom
Hi Karen,
snip
use strict;
use warnings;
use Fcntl qw(:flock);
open(F,somefile.txt) || die $!;
flock(F,LOCK_EX);
# do stuff with F
flock(F,LOCK_UN);
close(F);
/snip
If you're on windoze, don't expect it to work with 9x.
Regards
Toby
-Original Message-
From: Karen Liew Ying Ping
Hi,
I am writting a XS wrapper between some C bits and an executable in Perl. I
compile the wrapper as a Shared Lib and I want to load it dynamicaly from
Perl using Dynaloader.
I have done some tests with a simple Hello World like program and it work
fine, but when it comes to real thing,
Hello - I am trying to use ActiveState perl on windows and I am trying
to figure out how to chdir to a parent directory. I have tried the
following:
chdir (..);
chdir (\\..);
but no avail. Any ideas?
tim
Hello Everyone,
I am trying to access Oracle database object (a table's contents) through a
CGI script to print the information on the web page, but I am continuously
getting this error message,
ORACLE_HOME environment variable not set!
DBI-connect(aali) failed: Error while trying to retrieve
Michael Rauh wrote at Fri, 05 Jul 2002 08:39:42 +0200:
hi,
say i have an unsorted (large) list of, e.g., 0's and 1's:
@list = (0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, ...)
i now want to remove all the zeros, using the fastest way possible. how would U do
that?
When it is so important to
Hello - I am trying to use ActiveState perl on windows and I am trying
to figure out how to chdir to a parent directory. I have tried the
following:
chdir (..);
chdir (\\..);
chdir ('..');
chdir ('../');
Use single quotes. so that special characters are treated as literals. . and \
are
You will need to set your $ORACLE_HOME
$ORACLE_HOME = /path/to/oracle;
-Original Message-
From: Naser Ali [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 05, 2002 9:32 AM
To: '[EMAIL PROTECTED]'
Subject: CGI and Oracle Question,
Hello Everyone,
I am trying to access Oracle database
snip
use strict;
use warnings;
my @list = qw(0 1 1 1 0 1 0 0 1 1 0 0 0 1 0 1 0 1 1);
my @out;
@out = grep($_ != 0, @list);
foreach (@out){ print $_, \n; }
/snip
-Original Message-
From: Michael Rauh [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 05, 2002 4:40 PM
To: Beginners, Perl
thx to all, grep seems to be the best way to do it.
greetings
michael
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I did. It is set in the .profile of user www. I dont know how to set it
inside thecalling script though.?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 05, 2002 10:43 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: CGI and Oracle
Thanks Stephen,
I added the line as you mentioned. I am getting this error message. I
verified the TNS settings by logging into database using sqlplus as user
www and it worked fine.
===
DBI-connect(aali, aali, aali) failed: ORA-12154: TNS:could not resolve
service name
Thnx
These modules suit me.
On Thu, 2002-07-04 at 22:17, Peter Scott wrote:
At 03:40 PM 7/4/02 +1000, Toby Stuart wrote:
http://search.cpan.org/
Net::DNS::* ???
There might be something there that does what you need.
Indeed. From
Hi.
Seems like something isn't installed properly:
Can't locate auto/DBI/prepare.al in @INC
You're missing a module or something. Not too familiar with DBI myself, so
don't know which one, but checking search.cpan.org for DBI and Oracle might
be helpful (?)...
Best Regards
Anders Holm
hi,
say i have an unsorted (large) list of, e.g., 0's and 1's:
@list = (0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 1, ...)
i now want to remove all the zeros, using the fastest way possible. how
would U do that?
i thought of sorting the zeros the left (or right) and then shift (or
pop) all zeros. or
However, for your case, the last result would be an array like this
@newArray = [1,1,1,1,1,1,1,1.]; # Seems meaningless... =)
So, I guess, the final stuff you want maybe $#newArray..
If that's your case, you may also try this :
my $true = 0; # you may set as -1 if you want the first
On Friday, July 5, 2002, at 04:36 , BUFFERNE,VINCENT (Non-HP-France,ex1)
wrote:
[..]
I have done some tests with a simple Hello World like program and it
work
fine, but when it comes to real thing, problems arise and at run time, I
have the following error:
Can't find 'boot_foo' symbol in
At 03:08 PM 7/5/02 +1000, Toby Stuart wrote:
Hi Karen,
snip
use strict;
use warnings;
use Fcntl qw(:flock);
open(F,somefile.txt) || die $!;
flock(F,LOCK_EX);
# do stuff with F
flock(F,LOCK_UN);
close(F);
/snip
There seems to be a consensus to avoid LOCK_UN, although it will make
no
Has anyone tried to install Embperl without root privilages? I have used
embperl on other servers, but am now trying to install it on a shared
server. All I really need is embpexec.pl to work off-line.
Unfortunatly, when I try to run it, I get the following error message:
I wanted to download a couple of roth.net modules. Unable to reach
www.roth.net since 3 July.
Are others able to access it OK?
Rob
--
Rob McCormick
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Not able to access it here... Tried via the web and ping.
--
Chris Garaffa
use perl;
my %contact_info = (name= Chris Garaffa,
email = [EMAIL PROTECTED],
work= [EMAIL PROTECTED],
cell= 203.803.9066
Is there a way to check if the person accepts cookies?
thanks.
M
Try Cookies.pm,
$cookie_jar-accept_cookies($bool);
document at
http://search.cpan.org/doc/ILYAM/HTTP-WebTest-1.99_07/lib/HTTP/WebTest/Cooki
es.pm
- Original Message -
From: Mariusz [EMAIL PROTECTED]
To: perl [EMAIL PROTECTED]
Sent: Saturday, July 06, 2002 4:13 AM
Subject: cookies
Is
Are you checking from a web page, or do you just want to check a machine?
Also, what platforms are you using? I would guess that if you're checking
from a web page, then the easiest way to be sure would be to make a cookie.
-Original Message-
From: Mariusz [mailto:[EMAIL PROTECTED]]
O!! Right, you are definiatly right !! Thanks for correcting me..
and I am apologize to the list that I've given something wrong
context... Anyway, I just try to go on it with Perl way For me,
I'll use Javascript to deal with it with no doubt... Thanks for your
advise anyway.
Rgds,
Connie
Hi All,
I'm new to Perl and I just have a quick question.
Within my perl pgm I'm trying to set it up so that if an error occurs an
email is sent to a certain person, page etc.
So far All I've done is set up a hash as shown below: How can I use this
hash and any built modules to accomplish
You'll need access to an SMTP server. The first module I would recommend is
Net::SMTP, but if you're not all that familiar with Net::SMTP, then I would
recommend going to http://search.cpan.org and doing a search on mail, smtp,
etc.
-Original Message-
From: William Black [mailto:[EMAIL
Modules :
Net::SMTP
Mail::Sender
If you are using Linux like OS , and have sendmail
$| = 1;
open (FH, | sendmail -t)
# I forget what should be added on the above to protect /pwd/
print FH Content;
close (FH);
Rgds,
Connie
- Original Message -
From: William Black [EMAIL PROTECTED]
Yeah, that would work, unless you want to notify more than one person. Then
it gets a little more complicated. Using the example you gave, it would be
fairly easy to create a script that notified your contact. Something like
this:
###
use Net::SMTP;
use strict;
On Friday, July 5, 2002, at 05:27 , William Black wrote:
[..]
So far All I've done is set up a hash as shown below: How can I use this
hash and any built modules to accomplish my task. In addition, if there
areany modules please include them.
%contact_info{
name = 'John Smith',
On Friday, July 5, 2002, at 05:58 , Timothy Johnson wrote:
Yeah, that would work, unless you want to notify more than one person.
Then
it gets a little more complicated. Using the example you gave, it would
be
fairly easy to create a script that notified your contact. Something like
T == T B Booher [EMAIL PROTECTED] writes:
T Hello - I am trying to use ActiveState perl on windows and I am trying
T to figure out how to chdir to a parent directory. I have tried the
T following:
T chdir (..);
This should work just fine. How do you know this one didn't work?
--
Randal
What's an easy way to tell if a particular module is installed on my server?
I'm sure I read this somewhere, but can't find it. Thanks!
-- John
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Please anybody I am begging now. Please help...
This is a mess now... I even have no concept on how to start.
I will working on something like this
There are 2 interface as input. One is a Web interface, which will accept
HTML tag and plain text by POST method, but by GET
Excellent. Thanks. I've been trying to install Embperl all day
and my brain was too worn out to figure this out. I'm suspecting
that I don't have some crucial modules installed . . . had list
of dependant modules, but no easy way to discover if they are
there. Thanks again!
-- John
# #
45 matches
Mail list logo