[29269] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 513 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Jun 14 14:10:31 2007

Date: Thu, 14 Jun 2007 11:09:14 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 14 Jun 2007     Volume: 11 Number: 513

Today's topics:
    Re: a password encryption question. <wyzelli@yahoo.com>
    Re: a password encryption question. <peter@makholm.net>
    Re: Best error handling mechanism? anno4000@radom.zrz.tu-berlin.de
    Re: Does anybody know why mx1.hotmail.com doesn't respo <bik.mido@tiscalinet.it>
        Get the piece of code in perl <mhm.reddy@gmail.com>
    Re: Get the piece of code in perl <mritty@gmail.com>
    Re: How can I use the string variable expansion for OO  <ilias@lazaridis.com>
    Re: How can I use the string variable expansion for OO  <ilias@lazaridis.com>
    Re: How to check the perl's syntax error before runing   ramesh.thangamani@gmail.com
    Re: How to check the perl's syntax error before runing  <nobull67@gmail.com>
    Re: How to check the perl's syntax error before runing  <tadmc@seesig.invalid>
        Interesting PERL anamoly - confirmation and/or explanat  xyz88888@aol.com
    Re: Interesting PERL anamoly - confirmation and/or expl <nobull67@gmail.com>
    Re: Interesting PERL anamoly - confirmation and/or expl <mritty@gmail.com>
    Re: Interesting PERL anamoly - confirmation and/or expl <nobull67@gmail.com>
    Re: Passing literal with reference? <rvtol+news@isolution.nl>
    Re: perl and  php <bik.mido@tiscalinet.it>
    Re: perl and  php <bik.mido@tiscalinet.it>
    Re: perl and php <cwilbur@chromatico.net>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Thu, 14 Jun 2007 10:05:34 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com>
Subject: Re: a password encryption question.
Message-Id: <Op8ci.13808$wH4.11439@news-server.bigpond.net.au>

"Brad Baxter" <baxter.brad@gmail.com> wrote in message 
news:1181748959.809432.38760@x35g2000prf.googlegroups.com...
> On Jun 10, 9:35 pm, Joe Smith <j...@inwap.com> wrote:
>> nightc...@gmail.com wrote:
>> > However, a new problem was created.
>> > My Login.cgi could not read the ramdom-cryped password.
>> > The related script was,
>> >    @alphabet = ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '.', '/');
>> >    $salt = join ('', @alphabet[rand (64), rand (64)]);
>>
>> No.  The salt is supposed to be randomized when
>> the password is originally set; not when it is being compared.
>>
>> >    if (crypt($password, $salt) ne $pwordlist{$FORM{'username'}})
>>
>>    $password_on_record = $pwordlist{$FORM{username}};
>>    $salt = substr $password_on_record,0,2;
>>    if (crypt($password,$salt) ne $password_on_record)
>
> FWIW, you don't have to send crypt a substring; it will handle the
> full string just fine.

Yes, but the reason to use a substring is when it is a substring being the 
first two characters of the stored password, which is the salt.

Hence the difference between $password and $passwd.

P 



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

Date: Thu, 14 Jun 2007 10:14:38 +0000
From: Peter Makholm <peter@makholm.net>
Subject: Re: a password encryption question.
Message-Id: <877iq67shd.fsf@makholm.net>

"Peter Wyzl" <wyzelli@yahoo.com> writes:

>> FWIW, you don't have to send crypt a substring; it will handle the
>> full string just fine.
>
> Yes, but the reason to use a substring is when it is a substring being
> the first two characters of the stored password, which is the salt.

Except that modern crypt(3) implements stronger hash functions than
DES. To use these stronger hash values you give some specific forms of
salt, usually defined by '$<hash id>$<salt>$' 

If you use "$password eq crypt($given,$password)" perl does the right
thing no matter which hash function the parsword is crypt(3)'ed with.

//Peter Makholm


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

Date: 14 Jun 2007 09:06:32 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Best error handling mechanism?
Message-Id: <5dceooF33htfkU1@mid.dfncis.de>

Rob Hoelz  <hoelz@wisc.edu> wrote in comp.lang.perl.misc:
> I've read numerous articles on the internet, and I haven't come to a
> clear conclusion yet:  What form of error handling is best in Perl?
> I've seen try/catch with Error.pm, eval/die with Exception.pm, and just
> plain old eval/die.  What's the best way to go about creating a robust
> error handler?

There is no best way.

You haven't even hinted at what kind of project you need error handling
for.  It takes intimate knowledge about a project and its surrounding
conditions to make an informed decision about a detail like that.

There is a chapter (or section) about error handling in _Perl Best
Practices_ by Damian Conway.  I'd take a look at that for general
points of view.  Otherwise, you'll have to do what everybody has to
do:  Evaluate the options, identify their advantages and disadvantages
in relation to the project and take a pick.

If that's too tedious (it is tedious) just take a pick and hope for the
best.

Anno


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

Date: Thu, 14 Jun 2007 18:18:18 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: Does anybody know why mx1.hotmail.com doesn't response correctly? Thanks
Message-Id: <veq273l7k89c0vqinum921nmu7un9kn7h2@4ax.com>

On Mon, 11 Jun 2007 16:17:55 -0700, mike <needpassion@gmail.com>
wrote:

>Dude, I create the lower level code doesn't mean I am a hacker. Have
>you ever seen a hacker asked this such low lever questions? :-)

s/hacker/(qw<cracker spammer>)[rand 2]/ge;

http://en.wikipedia.org/wiki/Hacker


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 14 Jun 2007 05:14:15 -0700
From:  Maruthi Reddy <mhm.reddy@gmail.com>
Subject: Get the piece of code in perl
Message-Id: <1181823255.354079.247010@i38g2000prf.googlegroups.com>

Hi All,

I want to get the pieces of code from the contents of file.
I can push the file contents into the array, But not getting some to
way to get the required piece of code.

My file looks something like

-------------------File start-------------------
 .............. ............. ... ...  .............
 ................ ..... ........ ........... ......
AAA..... ............. ............. .........
 .............. .......... ............. .......
BBB ........ ........... ........ ...........
 ........... .......... .......... ...............
 ...... .......... .......... ........... ..........
AAA .... ........... .......... ............ .
 .......... ........ .............................
 .............................. ..............
BBB ...........................................
 ............................. ........... .....
----------------------File end ----------------

Here i would like to get the piecc of code between AAA and BBB.
Please suggest me.

Thanks,
mhm reddy.



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

Date: Thu, 14 Jun 2007 05:37:21 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: Get the piece of code in perl
Message-Id: <1181824641.000729.200170@i13g2000prf.googlegroups.com>

On Jun 14, 8:14 am, Maruthi Reddy <mhm.re...@gmail.com> wrote:
> Hi All,
>
> I want to get the pieces of code from the contents of file.
> I can push the file contents into the array, But not getting some to
> way to get the required piece of code.
>
> My file looks something like
>
> -------------------File start-------------------
> .............. ............. ... ...  .............
> ................ ..... ........ ........... ......
> AAA..... ............. ............. .........
> .............. .......... ............. .......
> BBB ........ ........... ........ ...........
> ........... .......... .......... ...............
> ...... .......... .......... ........... ..........
> AAA .... ........... .......... ............ .
> .......... ........ .............................
>  .............................. ..............
> BBB ...........................................
> ............................. ........... .....
> ----------------------File end ----------------
>
> Here i would like to get the piecc of code between AAA and BBB.
> Please suggest me.

There's about 10 different ways to do this.  Here's one:

my $file = do { local $/; <DATA> };
my @codes = ($file =~ /AAA(.*?)BBB/sg);
foreach $code (@codes) {
  print "$code\n\n";
}

Paul Lalli



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

Date: Thu, 14 Jun 2007 15:40:38 -0000
From:  Ilias Lazaridis <ilias@lazaridis.com>
Subject: Re: How can I use the string variable expansion for OO "$self->attribute"
Message-Id: <1181835638.807011.296690@d30g2000prg.googlegroups.com>

On Jun 12, 8:19 pm, Brian McCauley <nobul...@gmail.com> wrote:
> On Jun 9, 12:57 pm, Ilias Lazaridis <i...@lazaridis.com> wrote:
[...] - (readability)
[...] - (TieOff module)

> > Thanks for the info, but I'm unable to see how I could process this
> > string:
>
> > return "$self->label: $self->val($attrib)"
>
> I know of no way. The trick of creating hashes that are really
> functions allows you to get function calls to interpolate (because
> they look like hashes).
>
> > is there any stand-alone function available (something like
> > "stringeval"), which would process the string correctly?
>
> Not that I know of .

ok

> > If yes (or if I write my own), is there a way to override the default
> > string-processing behaviour of perl on a per-package basis?
>
> For string literals yes, not for the interpolation rules. At least not
> without resorting to source filters.

ok.

So, it seems if I want to have somethin other like

return sprintf "%s: %s", $self->label, $self->val($attrib);

that I have to code myself something like e.g.:

return sip "$self->label: $self->val($attrib)";

 .

--
http://dev.lazaridis.com/lang/ticket/13



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

Date: Thu, 14 Jun 2007 16:30:08 -0000
From:  Ilias Lazaridis <ilias@lazaridis.com>
Subject: Re: How can I use the string variable expansion for OO "$self->attribute"
Message-Id: <1181838608.502436.62950@j4g2000prf.googlegroups.com>

On Jun 13, 12:59 pm, anno4...@radom.zrz.tu-berlin.de wrote:
> Ilias Lazaridis  <i...@lazaridis.com> wrote in comp.lang.perl.misc:
>
> > On Jun 9, 3:52 pm, "Dr.Ruud" <rvtol+n...@isolution.nl> wrote:
> > > Ilias Lazaridis schreef:
>
> > > >     return "$self->label: $self->val($attrib)";
> > > > is ther ANY way of achieving this, whilst using ONLY the string?
>
> > > Just play with it:
> > [...] examples.
>
> > I really meant to process this string.
>
> > As asked in my other reply:
>
> > is there any stand-alone function available (something like
> > "stringeval"), which would process the string correctly?
>
> Define "correctly".  There are serious parsing problems involved
> in recognizing arbitrary code that is embedded in a string.

With "correctly" I meant "As expected by a programmer".

parsing problems are ther to be solved.

anyway, I've just tried to verify that there is no existent
solution available.

As said in the other answer:

So, it seems if I want to have somethin other like

return sprintf "%s: %s", $self->label, $self->val($attrib);

that I have to code myself something like e.g.:

return sip "$self->label: $self->val($attrib)";

 .

--
http://dev.lazaridis.com/lang/ticket/13

 .

--
http://dev.lazaridis.com/lang/ticket/13



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

Date: Thu, 14 Jun 2007 07:35:19 -0000
From:  ramesh.thangamani@gmail.com
Subject: Re: How to check the perl's syntax error before runing the code?
Message-Id: <1181806519.566576.208590@n15g2000prd.googlegroups.com>

On Jun 14, 10:04 am, "J=FCrgen Exner" <jurge...@hotmail.com> wrote:
> sonet wrote:
> > How to check the perl's syntax error but does not execute it?
>
> Trivial. Did you check the documentation of perl?
> From "perldoc perlrun":
>     -c   causes Perl to check the syntax of the program and then exit
>          without executing it. [...]
>
> jue


Also using the option -w will be useful in checking the warnings.



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

Date: Thu, 14 Jun 2007 08:16:54 -0000
From:  Brian McCauley <nobull67@gmail.com>
Subject: Re: How to check the perl's syntax error before runing the code?
Message-Id: <1181809014.121834.297610@q19g2000prn.googlegroups.com>

On Jun 14, 5:15 am, "sonet" <sonet....@msa.hinet.net> wrote:

> How to check the perl's syntax error but does not execute it?

Sorry this is impossible.

You can use -c which causes the perl compiler to exit at the point
just before it starts to execute the main body of the script.

However, at this point any code in BEGIN and CHECK blocks will already
have been executed.

> The eclipse (PERL EPIC Project) can check the perl's syntax
>  error when the code does not in runtime.

It is impossible to fully check the syntax of Perl code without
allowing it to execute. This is a known problem with Perl5. In
principle you could run perl -c in a chroot shadbox. I don't know if
eclipse does this.

> And it support source format the perl's code.Have any rules
> can do that?

Yes, look at Perl the syntax highlighting rules in any popular open-
source programmers' editor. However these rules are only approximate
because "only perl can parse Perl".




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

Date: Thu, 14 Jun 2007 05:49:23 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: How to check the perl's syntax error before runing the code?
Message-Id: <slrnf7279j.mc8.tadmc@tadmc30.sbcglobal.net>

ramesh.thangamani@gmail.com <ramesh.thangamani@gmail.com> wrote:
> On Jun 14, 10:04 am, "Jürgen Exner" <jurge...@hotmail.com> wrote:
>> sonet wrote:
>> > How to check the perl's syntax error but does not execute it?
>>
>> Trivial. Did you check the documentation of perl?
>> From "perldoc perlrun":
>>     -c   causes Perl to check the syntax of the program and then exit
>>          without executing it. [...]
>>
>> jue
>
>
> Also using the option -w will be useful in checking the warnings.


You don't need the -w switch if you have enabled lexical warnings
in your code (and you should have).


-- 
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"


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

Date: Thu, 14 Jun 2007 10:09:18 -0700
From:  xyz88888@aol.com
Subject: Interesting PERL anamoly - confirmation and/or explanations welcomed
Message-Id: <1181840958.425125.321310@i13g2000prf.googlegroups.com>

I encountered a problem with a PERL script I wrote, and I would like
to find out if this is just a problem with the ActiveState PERL
interpreter, or a problem in the PERL spec itself. I am using the
ActivePerl interpreter, build 820 version 5.8.8. I looked for other
free downloadable PERL interpreters to compare results, but had no
luck. So I'm hoping to get some feedback from any of you interested
folks.

The input: a multimedia production storyboard in ASCII-text format.
Sections of the file contain dialogue for voice-overs, and I want to
parse out just this stuff and ignore the rest. In this case, I need
all lines starting with the string '(rules script) "' copied to the
output file of my script.

The process: my PERL script reads in the file line-by-line, does
string matching against the first part of each line and based on some
logic, determines if and how that line should be copied to the output
file.

The problem: in some instances, the string to be used in the matching
function needs to be stripped out before copied to the output file. I
do this using "positional parameters" ($1, $2,...) from the match
command. Whenever the string contains non-alphanumeric characters
(with the "\" escape), those characters seem to cause the substitution
command to fail. After numerous codings, I concluded that based on the
various outputs.

The code: For brevity I am only including the combinations of match
conditionals and the substitution commands I tried that are related to
this specific problem. I'll copy the whole script down below for those
who want to see the whole thing, although everything else works fine.
The match function is written to match the string '(rules script) "'
at the beginning of a line.

Variation 1:

   } elsif (/(^\(rules script\) ")/) {
      s/$1//;
      print OUTFILE;
   }

Result 1:
(rules script) "If you need.....

Comments:
This was the first attempt. The outer parans go with the elsif, the
middle parans set the value for $1 (I expected!), and the inner parans
are escaped as they are part of the string matching. Based on the
output I concluded no sub-ing of any kind was performed - input
matched output verbatim.

variation 2:

   } elsif (/(^\(rules script\) \")/) {
      s/$1//;
      print OUTFILE;
   }

Result 2:
(rules script) "If you need.....

Comments:
My first suspician was the double-quote at the end of the match. So I
put an "\" before it to ensure it was treated as a literal and copied
into the value for $1. No change.

Variation 3:

   } elsif (/(^\(rules script\) ")/) {

print STDERR "\n1=$1\n";
      s/\($1\)\s\"//;
      print OUTFILE;
   }

Result 3:
(to STDERR)1=(rules script) "

OUTPUT: (rules script) "If you need.....

My suspicion was confirmed. $1 has the correct string after the
successful match, but for some reason the sub command is failing. I
hoped that putting in the non-alphanums into the first parameter of
the sub command would work, but it did not. Onto 4 (and qualified
success!)...

Variation 4:

      } elsif (/(rules script)/) {

print STDERR "\n1=$1\n";
      s/\($1\)\s\"//;
      print OUTFILE;
   }

Result 4:
(to STDERR)1=(rules script) "

OUTPUT: If you need.....

Comments:
At last, I got the result I wanted! Unfortunately I had to literally
spell it out for the script. Wanted to rule out that it was the non-
alphanums that were mucking up the sub.

Going for broke, I tried doing the sub and matching together in the
conditional test, and that worked fine too.
 } elsif (s/^(\(rules script\)\s\")//) {


Conclusions:
* using the positional parameter ($1) in sub-ing = ok
* using non-alphanums in sub-ing = ok
* using a positional parameter containing alpha-nums in sub-ing = NA-
AH!

So my curiosity is whether this is a bug in the ActiveState version of
PERL, the PERL spec itself (not likely), or my logic (usually my first
suspicion, but this time I think I'm off the hook of guilt, no?).

Please reply if you have any insight or gave it a go yourself and got
some useful results. Thanks.

- DK

P.S. As promised, here is the whole script.

$x = 0;
$cont = "f";
$csm = "f";

open (INFILE, "lcm01_v1d-TO.txt");
open (OUTFILE, ">outfile.txt");

while (<INFILE>) {
++$x;
   chomp;

   if (/^(lcm01_\d{3}\w*)\s?/) {
      $csm = "f";
      print OUTFILE "\n$_\nNARRATOR: ";

   } elsif (s/^(\(rules script\)\s\")//) {

print STDERR "\n1=$1\n";
      s/\($1\)\s\"//;
print STDERR "\n$x:\n$_\n";

      s/"\s*$/ /;
      print OUTFILE;
      print OUTFILE "When you have completed this exercise, click the
Next button to continue.\n";

   } elsif ($cont eq "t") {
      chomp; chomp; chomp;

      if ((/^Notes$/)
      || (/^Correct Answer:$/)
      ||  (//))
      {
         $cont = "f";

      } elsif (/"\s*$/) {
         $cont = "f";
         s/"\s*$/\n/;
         print OUTFILE;

      } else {
         print OUTFILE;
      }

   } elsif ((! /TRAINER:/)
     && (/([A-Z]+):\s+"?(.+)/))
     {
      $cont = "t";

      if ($1 eq "CSM") {
         $csm = "t";
         $line = "\n$1: $2";

      } elsif (($line = $2) =~ m/^Click/) {
         $cont = "f";

         if ($csm eq "f") {
            $line = "\n$line";
         } else {
            $line = "\nNARRATOR: $line\n";
         }

      } elsif ($1 eq "NARRATION") {
         $line = "\n$1: $2";

      } elsif ($csm eq "t") {
         $line = "\n$1: $2";

      } elsif ($csm eq "f") {
         $line = "$2";
      }

      if ($line =~ m/("\s*)$/) {
         $line =~ s/$1/\n/;
         $cont = "f";
      }

      print OUTFILE $line;
   }
}

close INFILE;
close OUTFILE;
end;



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

Date: Thu, 14 Jun 2007 10:37:48 -0700
From:  Brian McCauley <nobull67@gmail.com>
Subject: Re: Interesting PERL anamoly - confirmation and/or explanations welcomed
Message-Id: <1181842668.830790.13660@d30g2000prg.googlegroups.com>

On Jun 14, 6:09 pm, xyz88...@aol.com wrote:
> I encountered a problem with a PERL script I wrote,

See FAQ: What's the difference between "perl" and "Perl"?

> The problem: in some instances, the string to be used in the matching
> function needs to be stripped out before copied to the output file. I
> do this using "positional parameters" ($1, $2,...) from the match
> command. Whenever the string contains non-alphanumeric characters
> (with the "\" escape), those characters seem to cause the substitution
> command to fail.

>       s/$1//;

The positional parameters ($1 et al) are a red herring here.

A much simpler illustration of your problem.

for my $foo ( 'This string contains [regex] metacharacters!','but this
does not') {
  print "\$foo is: $foo\n";
  print "\$foo does not match \$foo!\n" unless $foo =~ /$foo/;
}

When you interpolate a string into a regex any regex metacharacters
are (by default) still treated as meta. (IIRC this will change in
Perl6).

To interpolate the string without metacharacter interpretation...

/\Q$foo\E/

>    } elsif (/(^\(rules script\) \")/) {
>       s/$1//;
>       print OUTFILE;
>    }

Of course this is much more simply written...

    } elsif (s/(^\(rules script\) ")//) {
       print OUTFILE;
    }

 ...which side-steps the whole issue in this particular case.



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

Date: Thu, 14 Jun 2007 10:45:57 -0700
From:  Paul Lalli <mritty@gmail.com>
Subject: Re: Interesting PERL anamoly - confirmation and/or explanations welcomed
Message-Id: <1181843157.872473.30010@g37g2000prf.googlegroups.com>

On Jun 14, 1:09 pm, xyz88...@aol.com wrote:

> The problem: in some instances, the string to be used in the matching
> function needs to be stripped out before copied to the output file. I
> do this using "positional parameters" ($1, $2,...) from the match
> command. Whenever the string contains non-alphanumeric characters
> (with the "\" escape), those characters seem to cause the substitution
> command to fail. After numerous codings, I concluded that based on the
> various outputs.

perldoc -f quotemeta

perldoc -q quote
Found in /opt2/Perl5_8_4/lib/perl5/5.8.4/pod/perlfaq6.pod
     How can I quote a variable to use in a regex?


Paul Lalli



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

Date: Thu, 14 Jun 2007 11:00:57 -0700
From:  Brian McCauley <nobull67@gmail.com>
Subject: Re: Interesting PERL anamoly - confirmation and/or explanations welcomed
Message-Id: <1181844057.716162.300100@z28g2000prd.googlegroups.com>

On Jun 14, 6:37 pm, Brian McCauley <nobul...@gmail.com> wrote:

> To interpolate the string without metacharacter interpretation...
>
> /\Q$foo\E/

Note: in this simple case the \E is redundant.



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

Date: Thu, 14 Jun 2007 10:19:07 +0200
From: "Dr.Ruud" <rvtol+news@isolution.nl>
Subject: Re: Passing literal with reference?
Message-Id: <f4r4qj.1fg.1@news.isolution.nl>

dorno schreef:

> I still have not found an example in all
> my Perl books.  Apparently passing a literal reference in a mixed
> string of parameters is not done by Perl gurus.  Or else they
> consider it so simple that no verbage need be wasted on the topic.

I remember there are some places in the Perl documentation where
references to a literal are mentioned. For example as a way to define
PI, or the size of an IO-buffer.

-- 
Affijn, Ruud

"Gewoon is een tijger."



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

Date: Thu, 14 Jun 2007 19:16:51 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: perl and  php
Message-Id: <6nt273trsn4shbqkomce94pq2gdp3ps3e5@4ax.com>

On Tue, 12 Jun 2007 11:19:32 GMT, peter <pm3e@juno.com> wrote:

>back into it.  I liked "C" but Java seems like the way to go for 
>compiled langs, now days so I will learn that.

I wouldn't put them exactly on the same level. Perhaps Java is more
hype-like nowadays. IMHO you can safely start with it and then pass to
C if needed. Or the other way round. Both ways are viable IMHO. In one
you start nearer to the bare metal then get away
>
>At one time, I did a bit of perl but now I see php alot.  I was 
>wondering what you guys thinks of the pros/cons of  perl and php.

Different beasts. Although I seem to have heard that php is now
available as a general purpose programming language too, that is
charachteristic typical of Perl, while the former is decidedly an
application specific one: i.e. thought to be embedded in HTML to
create dynamical pages.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: Thu, 14 Jun 2007 19:18:50 +0200
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: perl and  php
Message-Id: <r2u273hcnp3uttrmjg97hk2n9v964eqco7@4ax.com>

On Tue, 12 Jun 2007 18:26:25 -0400, peter <pm3e@juno.com> wrote:

>btw do abigale (sp?) and larry still contribute?  (that is how long ago 
>i did perl)

AbigAIL occasionally posts here. $Larry is active elsewhere.


Michele
-- 
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
 .'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,


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

Date: 14 Jun 2007 08:01:23 -0400
From: Charlton Wilbur <cwilbur@chromatico.net>
Subject: Re: perl and php
Message-Id: <871wgesq24.fsf@mithril.chromatico.net>

>>>>> "n" == noident  <noident@my-deja.com> writes:

    n> If you want to just develop apps for websites, especially if
    n> you want to collaborate with other developers on this, then PHP
    n> is the language of the web these days (like it or not).

This depends on the style of application and on the company you're
building it for.  PHP is the language of the quick-and-dirty web, and
of the thin CRUD interface to a database system, but Perl, Python,
Ruby (on Rails), Java, and various proprietary Microsoft languages
also have very strong presences on the web.  Which one is the best
choice really depends on the sort of application you're building, the
audience for the software and for the product, and a host of other
technical tradeoffs.

(Further, I'd advise against choosing a career path based on the
advice of an anonymous person in a newsgroup.)

Charlton


-- 
Charlton Wilbur
cwilbur@chromatico.net


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

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 V11 Issue 513
**************************************


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