Misplaced Pages

Talk:Perl: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 09:41, 14 November 2004 editRfl (talk | contribs)4,904 edits Web hosting advertisements← Previous edit Latest revision as of 11:44, 6 January 2024 edit undoKj cheetham (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, New page reviewers, Pending changes reviewers, Rollbackers141,077 edits Assessment: banner shell, Computer science, Computing, C/C++, Software, Perl (Rater
(795 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
{{Skip to talk}}
== A sample Perl program ==
{{Talk header|noarchive=yes|search=no}}
{{article history
# A sample Perl program
|action1=GAN|action1date=22:38, 14 December 2005|action1link=Talk:Perl#GA review needed|action1result=listed|action1oldid=31344408
$message = "Hello, world! The magic number is 234542354.";
|action2=GAR|action2date=18:06, 10 March 2009|action2link=Talk:Perl/GA1|action2result=delisted|action2oldid=276226336
print $message;
|action3=GAN|action3date=08:06, 6 March 2011|action3link=Talk:Perl/GA2|action3result=listed|action3oldid=416507709
$message =~ s/d+/-1/;
|action4=GAR|action4date=20:13, 15 June 2021 (UTC)|action4link=Misplaced Pages:Good article reassessment/Perl/1|action4result=delisted|action4oldid=1038296778
print $message;
|currentstatus=DGA
exit 0
|otddate=2011-12-18|otdoldid=466456114
|otd2date=2015-12-18|otd2oldid=695751192
|topic=Engtech
}}
{{WikiProject banner shell|class=B|collapsed=yes|vital=yes|1=
{{WikiProject Computer science |importance=High}}
{{WikiProject Computing|importance=High|free-software=yes|free-software-importance=High|software=yes|science=y|science-importance=high|network=yes|network-importance=High}}
{{WikiProject C/C++ |importance=High |c=yes}}
{{WikiProject Software |importance=Mid}}
{{WikiProject Perl}}
}}
{{User:MiszaBot/config
| algo=old(365d)
| archive=Talk:Perl/Archive %(counter)d
| counter=8
| maxarchivesize=31K
| archiveheader={{Automatic archive navigator}}
| minthreadsleft=4
| minthreadstoarchive=1
}}
{{archives|search=yes}}


== Influence of COBOL on Perl? ==
----
:The above program can be written as:


]. ] (]) 23:22, 4 September 2018 (UTC)
$_ = "The magic number is 150\n";
:What about Python? Perl influence on Python, I'm having trouble to see this. Apart from the infobox Python is mentioned only two times in the entire article. Surprising enough, but certainly not due to influence, at least not in that direction. Perl came out in 87, Python 91, did Guido even know about it by the time? And influenced what? Python is about as different as it gets, and if it's about regexes then Perl "influenced" just about anything, only problem is it didn't exactly invent those either. It is less easy to argue that Python rather influenced Perl '''5''': Larry Wall pretty much took his inspiration for the OO extension from there. Not a secret and quite easy to cite. If anything, Python is listed in precisely the wrong row. -] (]) 04:05, 3 June 2021 (UTC)
print;
s/\d+/-1/;
print;


== GA Reassessment ==
:which demonstrates the idea of topic (<code>$_</code>) in Perl. Also, the <code>exit 0</code> at the end is completely redundant. (See: ]) ] 07:01, 7 Aug 2004 (UTC)


{{WP:Good article reassessment/Perl/1}}
:A version showing slightly more powerful regex, err, power in Perl:


== Article cites wikipage, wikipage cites article ==
$_ = "The magic number is 150\n";
print;
s/ (\d+) / $1 * 2 /ex;
print;
:Quite a nice example. ] 07:11, 7 Aug 2004 (UTC)
----


The article references https://www.wired.com/2007/12/dec-18-1987-perl-simplifies-the-labyrinth-that-is-programming-language/ but the Wired article says ''(Source: Misplaced Pages).'' This might warrant source removal/ensuring accuracy of any circularly cited facts. ] (]) 01:41, 16 August 2023 (UTC)
You're saying that it shows "high use of meaningful punctuation characters" ?
You've never seen any REAL perl code :). What about using this (uppercase input) as an example:

while(<>) {
$_=~y/a-z/A-Z/;
print;
}

--]
----
Even better would be a line noise winner from one of the obfuscated perl contests, if that code is public domain. :-)

But that would miss the point - we want to show real Perl code, not one that was deliberately obfuscated. --]

----
I feel this entry should shy away from obfuscated code entirely! It just helps encourage the FUD that Perl is unreadable/write only/whatever, and that's a biased opinion. I can write incredibly obfuscated Java, but no-one feels the need to be posting that on the Java page. It tarnishes the neutral tone of the entry. I'd go as far as to remove the example (it's a bit pointless anyhow, what exactly is it demonstrating? I could come up with far more interesting examples of punctuation character usage, so that can't be it).

Anway, as an aside, you do realize you can get rid of the $_ in your code?:

while(<>) {
tr/a-z/A-Z/;
print;
}

Any books that tell you otherwise, burn 'em!

Finally there's the succinct:

print uc while (<>);

... and I'll be surprised if there's anything more readable for the same task in any other popular language, assuming you've bothered to learn at least the rudiments of Perl, that is.

-- ]

Or better yet:

print uc while <>;

Even more clean and readable. One only has to say: uc is upper-case and the diamond is input. Great example. ] 07:04, 7 Aug 2004 (UTC)

== ''Perl programming language''? ==

Why is this at ''Perl programming language''? Is there any reason for the disambiguation? Perl is just a redirect. --] 14:02 Jan 20, 2003 (UTC)
: For consistency in naming. It was decided some time ago that human languages would be suffixed "language" and computer languages would be suffixed "programming language". It's got nothing to do with disambiguation. If you are going to move all these computer language pages, make sure that you check the What links here for double redirects which you may have introduced and fix them -- ] 16:30 Jan 24, 2003 (UTC)

:: Yeah, I found out by now. We have changed this policy, also for languages (e.g. ]). Don't worry about double redirs, I will take care of those. --] 16:33 Jan 24, 2003 (UTC)

::: I agree with the term "programming language". However, I've noticed lots of references to this class of language which call them "computer languages". I don't really agree with the latter term, since they are really just human languages <i>used to program computers</i>. A minor point. As to appending "programming language" to the official titles, I think that's a ]... the single example of ] vs. ] should suffice to convince most people. 2 cents. --]

::::Java is a case of disambiguation, see ]. Perl is not. --] 16:46 Jan 24, 2003 (UTC)

::Oh, great. The naming policy changed and I never even saw the discussion, never mind took part in it. For the record I don't agree with the change and I find it annoying that it took place without any of my input. -- ] 16:42 Jan 24, 2003 (UTC)

::: See the interlanguage links on Perl. Everyone else is doing the right thing already. --] 16:46 Jan 24, 2003 (UTC)


== erl ==

See , under "What's the difference between Perl and perl?". erl is not and has never been an acronym. -- ] 23:36 Mar 6, 2003 (UTC)

It would seem, though, that the Perl documentation is self-contradictory in this regard, since says "perl - Practical Extraction and Report Language," which is how Larry Wall is supposed to have gotten the name for the language in the first place. -- ] 04:53 Aug 31, 2003 (UTC)

But if it was Practical Extraction and Report Language, the language name should be PEARL, not Perl. (Note: All caps, an `A'.) In fact, that was its original name until Larry found another language named PEARL (or Pearl). So it went to Perl, and the acronym no longer makes sense.

:Like what anon user (above) says, pearl (now perl) started off as an acronym and Larry Wall had to change the name in order to avoid clash with another language with the same name.
:The old expansion would still apply to perl as words like "and" are usually excluded from an acronym. However, Wall, the jovial person that he is, came up with the new acronym "Pathologically Eclectic Rubbish Lister" to match the new name. However I feel that these events and the link given by Nknight above should not be interpreted to mean that perl is no longer an acronym but a backronym. (refer interview with Larry Wall and the question ".. How'd you come up with that name?" http://www.linuxjournal.com/article.php?sid=3394 ) ] 08:32, 3 Mar 2004 (UTC)

::Hi, folks; perl never was an acronym. If it was, then Larry himself is lying. Anyone who's been in perl long enough to read the FAQ knows the story, and I've never heard anyone who's actually <i>read</i> the story claim that it's not true. Most everyone who claims perl was originally an acronym is much further removed than those who know the truth.
::Incidentally, I corrected the famous quip, "Nothing but perl can parse Perl," from Tom Christiansen. The source on this is . ] 15:55, 8 Mar 2004 (UTC)


::: Full Ack regarding the Perl FAQ. According to it, Perl is only ] to ''Practical Extraction and Report Language''.

::: '''But''' (and I noticed this just in this moment) if you look at http://history.perl.org/PerlTimeline.html under ], the (said to be) first ] shows exactly that ]. Perl History also talks about 18th of December 1987, release date of Perl 1.000.

::: But in fact the first occurence of Perl at all was in May 1987, see http://use.perl.org/articles/03/12/15/0326207.shtml?tid=1. The therein mentioned ] posting can be found at http://groups.google.com/groups?selm=4628%40sdcrdcf.UUCP. The posting mentions that at that date, Perl is already 3 months old.

::: I'll put the Usenet posting and the Perl History Timeline into the article as external links, so the details of what is true and what is not can be discussed before any decisions regarding the article's content are made. :-) --] 23:07, 11 Mar 2004 (UTC)

Blame me for the initial-cap spelling of Perl for the language. When we were writing the first Camel book, the lowercase
version of "perl" kept disappearing into the text. So I discussed with Larry, and we decided together that "perl" would
represent the interpreter (and be in constant-width font as a result), and "Perl" would represent the language. And no,
"PERL" was never valid. -- ]

===Name===

"''"Perl" was originally named "pearl", after the "pearl of great price" of Matthew 13:46''"

What is the reference to this information ? ] 14:44, 6 Mar 2004 (UTC)

: seems to be the source, with a little bit of thrown in for seasoning. ] 17:38, 6 Mar 2004 (UTC)

==Regular Expressions with Perl Examples==

<nowiki>"===Regular Expressions with Perl Examples==="</nowiki> is used in a novel way in this article. I'd have reserved that markup for section headings. - ] 03:20, 2 Mar 2004 (UTC)

== Perl - Practical Extraction and Report Language ==

The manpage for Perl begins with:

NAME
perl - Practical Extraction and Report Language

This article suggests that "Practical Extraction and Report Language" is deprecated and "was intended humorously". I see no evidence that this is the case. I intend to move "Practical Extraction and Report Language" into the intro and remove the presumably false statement if there are no objections.--]] 02:24, Apr 13, 2004 (UTC)

:I have strong objections, because Perl is not an acronym. The etymology of the name is very clear and would be widely known if people weren't so desirous of ignorance. All one has to do is read chapter 27 of the 3rd edition of the ], or google around a bit. The name of the language was originally to be "Pearl", before Larry heard of another language known as "PEARL". He removed a letter and all was well in the world. "Practical Extraction and Report Language" is a post-facto rationalization. Perl is not an acronym. -- ] 06:53, 13 Apr 2004 (UTC)

:: It doesn't matter if it is a "post-facto rationalization". We are not an etymological guide and the history of the name is only of marginal interest to most readers. If this is the way the word Perl is resolved in manuals today, then it should be prominently mentioned, not falsely claimed to be "intended humorously". I can agree to include the fact that Perl was ''technically'' not intended to be an acronym, but it is also a fact that it is today widely used as one, including by the makers of Perl.--]] 06:57, Apr 13, 2004 (UTC)

:::Feel free to remove any discussion about the name itself, but I will strongly oppose any attempt to define Perl as an acronym of "Practical Extraction and Report Language", as it is simply false, as anyone that has done substantive research on the subject will tell you. -- ] 07:06, 13 Apr 2004 (UTC)

::::That's just plain silly in a case where the official documentation uses the term as an acronym, but I can agree to label it a ] if that makes you happy.--]] 07:15, Apr 13, 2004 (UTC)

:::Etymological information is of encylopedic value, so don't remove anything of it. ] can refer the discussions above under sections "erl" and "Name" and take inputs from it. ] 10:32, 13 Apr 2004 (UTC)

== Explanation of for/foreach Syntax ==

I understand that this isn't supposed to be an exhaustive explanation of Perl syntax, but for/foreach are much more flexible and useful than this suggests. At the very least, I suggest replacing the "foreach ( array )" with "foreach ( LIST )", which is more accurate. (fish_at_uc_org)

: I just noticed the same thing and fixed it. --] | ] 17:17, Aug 16, 2004 (UTC)

::Technically, ARRAY is more accurate. If you give a literal list, it's first copied/aliased into an array, then the array is walked. -- ]

::: After I read your post, I immediately reverted my change (thus replacing ''list'' with ''array''). But I'm not sure that was the right thing to do, and I don't believe you were even suggesting such a reversion. (Namely because <tt>foreach( ''array'' )</tt> would disallow useful constructs like <tt>foreach( qw/foo bar baz/ )</tt> and even <tt>foreach( foo() )</tt>, which Perl obviously allows.) So I've reverted my original reversion; the article now uses <tt>foreach( ''list'' )</tt>. --] | ] 06:40, Aug 23, 2004 (UTC)

:::: Yeah, list is more appropriate and I believe Perl does copy the contents of the list given in a foreach context. -- ] 10:06, Aug 23, 2004 (UTC)

::: As I understand it, that part of the article is trying to explain the ''syntax'' of <tt>for</tt>, so the internals of the implementation, and the copying to a temporary array, are irrelevant. Syntactically, the target of the <tt>for</tt> is a list, not an array. Compare this with the target of <tt>pop</tt> or <tt>tie</tt>, which ''is'' syntactically an array. -- ] 13:44, 23 Aug 2004 (UTC)

:::: I agree. The array copy is an implementation detail. ] 09:03, 24 Aug 2004 (UTC)

::::: It is undoubtedly an implementation detail, but nevertheless quite an important one affecting the code meaning, so the list-like syntax notwithstanding, maybe it should be stated that in fact <code>for</code> iterates over an array, not a list:
::::: <code>@a=(1..10); for (@a) {@a=(); print} # prints only 1</code>
::::: ] 18:07, 24 Aug 2004 (UTC)

:::::: Saying that perl expects a LIST at that point doesn't imply that an array is being flattened into a LIST, does it? An array is still a LIST. (fish_at_uc_org)

:::::: You make a good point, but I'm not sure this article (or any article on a programming language) should get into such minutiae. Since arrays are lists, but not vice versa, <tt>foreach( ''list'' )</tt> should be used because 1) it's correct, even considering minute details, and 2) it's simpler than saying <tt>foreach( ''array'' )</tt> and then having to qualify it. --] | ] 00:55, Sep 15, 2004 (UTC)

== Sample code formatting ==

Regarding ]'s changes to the code formatting (using <nowiki><tt></nowiki> instead of <nowiki><pre></nowiki>), I think I prefer the look that the stylesheet imparts to <nowiki><pre></nowiki> blocks. --] 23:26, 15 Aug 2004 (UTC)

== Logo sugegstion ==
<div style="float:right;width:97px;text-align:center">
]
<br>
<small>
</small>
</div>
<pre>
<div style="float:right;width:97px;text-align:center">
]
<br>
<small>
</small>
</div>
</pre>
Would the &lt;div> code above be acceptable as an alternative to the bare image link, given the copyright restriction on the image (which I have expressed concerns about on the ])?
:No need for explicit DIV, just use the WikiImage code (as I have done). HTH HAND --] | ] 13:24, Aug 20, 2004 (UTC)

::OK, I was trying to avoid the frame, but I guess that's in keeping with the rest of the 'pedia. In fact, I think it's better to have the frame, as it makes it clear that we are not using it as an approval stamp.] 13:35, 20 Aug 2004 (UTC)

==Merits and demerits of Perl as a programming language==

Here's some text I removed, from a section named "Merits and demerits of Perl as a programming language":

:Like all programming languages, perl does some things well, and other things, well, less than efficiently. Many programmers have come to terms with this and use a judicious mix of shell-script and perl to get around the more obvious deficiencies (date manipulation can be slow in terms of relative processing time, for example). On the upside, perl is very useful for low level file manipulation at which, in many respects, its performance is often comparable with e.g. ].

I'm sure a section like ==Tasks for which Perl is unsuited== could be useful and informative, but the above paragraph has no redeeming qualities. Allow me to nitpick.

*''a judicious mix of shell-script and perl to get around the more obvious deficiencies'' -- Perl replaces and exceeds sh in nearly every capacity. When perl falls short, you either switch languages or call a utility, but the instances in which that utility would be sh are vanishingly rare.
*''date manipulation can be slow in terms of relative processing time, for example'' -- perhaps this is a rare example of when sh is better than Perl? If you can demonstrate this, I won't object to it being reinserted into the article.
*''perl is very useful for low level file manipulation'' -- This is too vague. By "low level file manipulation", do you mean manipulating links and permissions, or something even lower? Perl is ok for fiddling with links and permissions, I guess, but as a strength, it's no big deal. For lower-level operations... well, you'll have to clarify if that's what you meant.
*''at which, in many respects, its performance is often comparable with e.g. ].'' sed? Perhaps you meant ''data'' manipulation. This is one of the foundations of Perl and is well covered elsewhere in the article.

--] 08:01, 14 Sep 2004 (UTC)

: Yeah, I agree with ] -- ] 08:12, Sep 14, 2004 (UTC)

:I also agree. There's a lot of be said about Perl's failings and deficiencies (see , for example) but I don't think this is it. -- ] 13:14, 14 Sep 2004 (UTC)

==Web hosting advertisements==

I am removing a link to a list of Web hosting advertisements (" - List of companies offering perl in their web hosting plans.")
added to ] by ] whose every single edit was adding links to similar lists in other articles. ] 09:41, 14 Nov 2004 (UTC)

Latest revision as of 11:44, 6 January 2024

Skip to table of contents
This is the talk page for discussing improvements to the Perl article.
This is not a forum for general discussion of the article's subject.
Article policies
Find sources: Google (books · news · scholar · free images · WP refs· FENS · JSTOR · TWL
Former good articlePerl was one of the Engineering and technology good articles, but it has been removed from the list. There are suggestions below for improving the article to meet the good article criteria. Once these issues have been addressed, the article can be renominated. Editors may also seek a reassessment of the decision if they believe there was a mistake.
On this day... Article milestones
DateProcessResult
December 14, 2005Good article nomineeListed
March 10, 2009Good article reassessmentDelisted
March 6, 2011Good article nomineeListed
June 15, 2021Good article reassessmentDelisted
On this day... Facts from this article were featured on Misplaced Pages's Main Page in the "On this day..." column on December 18, 2011, and December 18, 2015.
Current status: Delisted good article
This  level-5 vital article is rated B-class on Misplaced Pages's content assessment scale.
It is of interest to multiple WikiProjects.
WikiProject iconComputer science High‑importance
WikiProject iconThis article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Misplaced Pages. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.Computer scienceWikipedia:WikiProject Computer scienceTemplate:WikiProject Computer scienceComputer science
HighThis article has been rated as High-importance on the project's importance scale.
Things you can help WikiProject Computer science with:

Here are some tasks awaiting attention:
WikiProject iconComputing: Networking / Software / CompSci / Free and open-source software High‑importance
WikiProject iconThis article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Misplaced Pages. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.ComputingWikipedia:WikiProject ComputingTemplate:WikiProject ComputingComputing
HighThis article has been rated as High-importance on the project's importance scale.
Taskforce icon
This article is supported by Networking task force (assessed as High-importance).
Taskforce icon
This article is supported by WikiProject Software.
Taskforce icon
This article is supported by WikiProject Computer science (assessed as High-importance).
Taskforce icon
This article is supported by Free and open-source software (assessed as High-importance).
Things you can help WikiProject Computer science with:

Here are some tasks awaiting attention:
WikiProject iconC/C++ High‑importance
WikiProject iconThis article is within the scope of WikiProject C/C++, a collaborative effort to improve the coverage of C and C++ topics on Misplaced Pages. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.C/C++Misplaced Pages:WikiProject C/C++Template:WikiProject C/C++C/C++
HighThis article has been rated as High-importance on the importance scale.
Taskforce icon
This article falls within the scope of C.
WikiProject iconSoftware: Computing Mid‑importance
WikiProject iconThis article is within the scope of WikiProject Software, a collaborative effort to improve the coverage of software on Misplaced Pages. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.SoftwareWikipedia:WikiProject SoftwareTemplate:WikiProject Softwaresoftware
MidThis article has been rated as Mid-importance on the project's importance scale.
Taskforce icon
This article is supported by WikiProject Computing.
WikiProject iconPerl (inactive)
WikiProject iconThis article is within the scope of WikiProject Perl, a project which is currently considered to be inactive.PerlWikipedia:WikiProject PerlTemplate:WikiProject PerlPerl

Archiving icon
Archives
Archive 1Archive 2Archive 3
Archive 4Archive 5Archive 6
Archive 7Archive 8


This page has archives. Sections older than 365 days may be automatically archived by Lowercase sigmabot III when more than 4 sections are present.

Influence of COBOL on Perl?

Talk:COBOL#Section_"Influences_on_other_languages". Apokrif (talk) 23:22, 4 September 2018 (UTC)

What about Python? Perl influence on Python, I'm having trouble to see this. Apart from the infobox Python is mentioned only two times in the entire article. Surprising enough, but certainly not due to influence, at least not in that direction. Perl came out in 87, Python 91, did Guido even know about it by the time? And influenced what? Python is about as different as it gets, and if it's about regexes then Perl "influenced" just about anything, only problem is it didn't exactly invent those either. It is less easy to argue that Python rather influenced Perl 5: Larry Wall pretty much took his inspiration for the OO extension from there. Not a secret and quite easy to cite. If anything, Python is listed in precisely the wrong row. -92.76.164.116 (talk) 04:05, 3 June 2021 (UTC)

GA Reassessment

Perl

Article (edit | visual edit | history· Article talk (edit | history· WatchWatch article reassessment pageMost recent review
Result: Delist Sourcing and prose issues still remain Aircorn (talk) 09:50, 17 August 2021 (UTC)

It has 44 citation needed templates. This does not meet the WP:GA requirements. There might be more issues, but this alone is enough to delist it. PhotographyEdits (talk) 20:14, 15 June 2021 (UTC)

  • Comment It looks like one user added 50 citation needed templates in 3 minutes on December 16th, 2020, taking the count from 4 to 54. That is a serious bit of tag bombing and 50 in 3 minutes does not suggest a lot of thought was put into these tags. Yet some of these tags are warranted, so a review is reasonable. --{{u|Mark viking}} {Talk} 11:10, 29 June 2021 (UTC)
  • Comment The prose needs some work too. Pinging Feezo who got it to GA status. Aircorn (talk) 23:25, 10 August 2021 (UTC)

Article cites wikipage, wikipage cites article

The article references https://www.wired.com/2007/12/dec-18-1987-perl-simplifies-the-labyrinth-that-is-programming-language/ but the Wired article says (Source: Misplaced Pages). This might warrant source removal/ensuring accuracy of any circularly cited facts. Bcjordan (talk) 01:41, 16 August 2023 (UTC)

Categories: