TEMPLETE

2001-11-03 Thread nafiseh saberi
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 ___

Re: Can I use split to split existing array !

2001-11-03 Thread Jeff 'japhy' Pinyan
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

unusual function..!!

2001-11-03 Thread nafiseh saberi
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

Re: Can I use split to split existing array !

2001-11-03 Thread nafiseh saberi
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

Can I use split to split existing array !

2001-11-03 Thread eventualdeath
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 @

Re: HOw do I create a package:

2001-11-03 Thread Dave Storrs
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

Re: merging two hashes together?

2001-11-03 Thread Dave Storrs
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

script for internal site link checks

2001-11-03 Thread birgit kellner
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

Re: regexp question

2001-11-03 Thread Martin Karlsson
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

Re: Without modifications

2001-11-03 Thread eventualdeath
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

Re: regexp question

2001-11-03 Thread Jeff 'japhy' Pinyan
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

regexp question

2001-11-03 Thread Martin Karlsson
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! --

Re[2]: merging two hashes together?

2001-11-03 Thread Maxim Berlin
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

RE: Array with selected records.

2001-11-03 Thread Wagner-David
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)'

Re: Perl with Java

2001-11-03 Thread Greg Meckes
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

Re: array slice syntax

2001-11-03 Thread Paul Johnson
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

Array with selected records.

2001-11-03 Thread Mark Weisman
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.) =

RE: merging two hashes together?

2001-11-03 Thread Wagner-David
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

Re: HOw do I create a package:

2001-11-03 Thread Jos I. Boumans
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

HOw do I create a package:

2001-11-03 Thread AMORE,JUAN (HP-Roseville,ex1)
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]

merging two hashes together?

2001-11-03 Thread AMORE,JUAN (HP-Roseville,ex1)
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

array slice syntax

2001-11-03 Thread Thomas Hofer
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

Re: Silly problem

2001-11-03 Thread Michael D. Risser
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

Perl with Java

2001-11-03 Thread pc
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]

Re: Reference's ?

2001-11-03 Thread Maxim Berlin
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

Without modifications

2001-11-03 Thread pc
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

thx for your help

2001-11-03 Thread Petazzoni Maxime aka sam
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 :