hi...
do u know how can I use templete in perl ??
(now I use html in perl source...)
thx.
_
Best regards
Try to always be hopefull
www.iraninfocenter.net
www.electronegar.com
www.sorna.net
___
On Nov 4, eventualdeath said:
>Q1) Can I use the split function to split an existing array (with
>several elements ) such as the example below.
No. split() uses a string.
>Q2) Could it be that the split function can only be used to split a
>scalar (one element).
Yup.
>Q3) Could someone ex
hi..
I see in many source that...use print <<"TABLE";
when want to work with html in cgi...
but I dont find this syntax of print ( print <<) in any document of perl..
why ?!!
thx a lot..
_
Best regards
Try to always be hopefull
hi...
all of your problem will solve with split..
it is very powerful...
please see in...
split [ PATTERN [ , EXPR† [ , LIMIT ] ] ]
Splits a string into an array of strings, and returns it. If LIMIT is
specified, splits into at most that number of fields. If PATTERN is also
omitted, splits at th
Hi,
I need some clarification :-
Q1)Can I use the split function to split an existing array (with several elements
) such as the example below.
Q2)Could it be that the split function can only be used to split a scalar (one
element).
Q3)Could someone explain to me the reason why @
With all due respect, this list is here to help beginner perl programmers
deal with programming problems, not to do people's homework for them.
(The 'hp.com' address (which prominently dispalys an ad for "hp's online
university") is a bit of a giveaway.)
Read this: perldoc perlmod
Dave
On Sa
In the example you provide, this will work:
-START
%h1 = ("one" => 1, "two" => 2, "three" => 3);
%h2 = ("four" => 4, "five" => 5, "six" => 6);
# Note that the '&' on function calls is optional, unlike $, @, and %
$ref_h3 = mergehash(_, _);
sub mergehash {
m
I'm having a cgi script administer a web site, and would now like to add
the possibility to change html file names via the script. This might also
involve moving the file to a different directory.
Assuming that other files will link to said file, I'd then have to update
links as well.
So I'm cu
Thanks Jeff! Works like a charm!
Be well!
/Martin
* Jeff 'japhy' Pinyan ([EMAIL PROTECTED]) wrote:
> On Nov 3, Martin Karlsson said:
>
> >Could anyone give me a push in the right direction, please?
> >How do I write a regexp that matches double instances of letters (in a
> >file i read into a va
Yes you can! use activestate from http://activestate.com/
- Original Message -
From: "pc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 03, 2001 8:54 PM
Subject: Without modifications
> I need to learn how to program CGI applications on a Unix box. However, I
> wo
On Nov 3, Martin Karlsson said:
>Could anyone give me a push in the right direction, please?
>How do I write a regexp that matches double instances of letters (in a
>file i read into a variable), e.g. aa LL pp etc. ?
>
>Is there an easy way, or must I use
> (aa|bb|cc|... and so on ) ?
You
Hi all!
Could anyone give me a push in the right direction, please?
How do I write a regexp that matches double instances of letters (in a
file i read into a variable), e.g. aa LL pp etc. ?
Is there an easy way, or must I use
(aa|bb|cc|... and so on ) ?
Thanks for your time!
--
Hello Wagner-David,
Saturday, November 03, 2001, Wagner-David <[EMAIL PROTECTED]> wrote:
WD> Here is one shot, though I changed some of the constants:
WD> #!perl -w
my %h1 = ("one" => 1, "two" => 2, "three" => 3);
my %h2 = ("four" => 4, "five" => 5, "six" => 6);
WD> my %h3 = ();
WD
In your test you are using numeric == vs eq string comparsion for one thing.
Also switch the print to:
print OUTFILE1 $rec;
Wags ;)
-Original Message-
From: Mark Weisman [mailto:[EMAIL PROTECTED]]
Sent: Saturday, November 03, 2001 11:09
To: 'Beginners@Perl. Org (E-mail)'
We use Perl and Java in our shop. I'm the Perl guy and I haven't encountered any
situation where I
couldn't code up something to do same thing that the Java apps do.
That's not to bring into it any 'preference' of one language over the other as they
both have
their usability goods and bads.
We
On Sat, Nov 03, 2001 at 05:49:37PM +0100, Thomas Hofer wrote:
> Hi!
>
> As a perl beginner, I have a silly question about
> array-slices-syntax:
>
> That's clear:
>
> perl -e '@a=(a,b,c);print "@a[1..2]\n"'
> ==> b c
>
> perl -e '@a=(a,b,c);print "$a[1]\n"'
> ==> b
>
> But why does $array[ra
Hello all:
Hey I'm wanting to populate an array with only select records, but I'm
not sure how (more importantly when) to use a comparison piece. Please
help me if you can:
Open (INFILE, "
close(INFILE);
foreach my $rec (@records) {
chomp($rec);
($val, $val1, $val2, etc.) =
Here is one shot, though I changed some of the constants:
#!perl -w
my %h1 = ("one" => 1, "two" => 2, "three" => 3);
my %h2 = ("four" => 4, "five" => 5, "six" => 6);
my %h3 = ();
mergehash( \%h1, \%h2, \%h3);
sub mergehash {
my ( $h1, $h2, $h3) = @_;
foreach my $MyKey1 ( ke
you're talking about simple OO programming...
i wrote a tutorial on just that subject, i think it will help you along with
your project.
take a look here:
http://japh.nu/index.cgi?base=tuts
hth,
Jos
- Original Message -
From: "AMORE,JUAN (HP-Roseville,ex1)" <[EMAIL PROTECTED]>
To: "Begi
Hello,
CAn anyone show me how to create a package called StringPrint and place this
package in a filename called StringPrint.pm using a subroutine, called
print_str, that prints a string passed to the subroutine defined by the
module.
Many Thanks!
JA
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
Hello Perl Gurus,
I'm trying to write a program that will merge two hashes together onto a
third hash called %h3. I need to
return a reference to %h3 to the main program and print each of the values
of the hash %h3 using the arrow notation.
Name of the actual function performing the merge mergeha
Hi!
As a perl beginner, I have a silly question about
array-slices-syntax:
That's clear:
perl -e '@a=(a,b,c);print "@a[1..2]\n"'
==> b c
perl -e '@a=(a,b,c);print "$a[1]\n"'
==> b
But why does $array[range] always give the first array-entry?
perl -e '@a=(a,b,c);print "$a[1..2]\n"'
==> a
(O
While that would work, since it is only a one line text file containing a
single I.P. address a much simpler way would be:
#!/usr/bin/perl -w
open(IPFILE, ");
The regex is, in this case at least, not really necessary.
Note the the key here is the chomp() function which removes any newline
ch
How widely is Perl Used in Java Shops?
Pc
_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hello JUAN,
Saturday, November 03, 2001, AMORE,JUAN (HP-Roseville,ex1) <[EMAIL PROTECTED]> wrote:
AJHRe> I'm new to creating references.
AJHRe> How do I create a small script that replaces "C" with "D" using a reference
AJHRe> only to the array element location for
AJHRe> "C"?
AJHRe> #!/usr/bi
I need to learn how to program CGI applications on a Unix box. However, I
would rather not do testing on our production internet server. We don't have
another unix box I can work on. Is it possible to test CGI applications in
the Windows environment? If so, will they run without modification in th
hi every one
i'm found the solution for my threads. i've replaced threads by the
select function, unsing vectors as described in the perlfunc manpage.
i obtain sthing like that (see attachement)
thx for your help
sam
--
...
| sam <°)(°> mail :
27 matches
Mail list logo