Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perlop: add basic =~ examples #7536

Closed
p5pRT opened this issue Oct 11, 2004 · 12 comments
Closed

perlop: add basic =~ examples #7536

p5pRT opened this issue Oct 11, 2004 · 12 comments

Comments

@p5pRT
Copy link

p5pRT commented Oct 11, 2004

Migrated from rt.perl.org#31937 (status was 'resolved')

Searchable as RT31937$

@p5pRT
Copy link
Author

p5pRT commented Oct 11, 2004

From @jidanni

perlop says​:

  Binary "=" binds a scalar expression to a pattern match. Certain
  operations search or modify the string $_ by default. This operator
...
  Binary "!
" is just like "=~" except the return value is negated in the
  logical sense.

I would add examples before going on to discuss !. Sure there are
examples of =
at other places on the page, but they are not the basic kind.

Examples are worth 1000 words.

Good ones on perlintro, but missing from =~'s chief documentation
place, perlop.

@p5pRT
Copy link
Author

p5pRT commented Oct 11, 2004

From @iabyn

On Mon, Oct 11, 2004 at 06​:48​:11PM -0000, Dan Jacobson wrote​:

# New Ticket Created by Dan Jacobson
# Please include the string​: [perl #31937]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org​:80/rt3/Ticket/Display.html?id=31937 >

perlop says​:

   Binary "=~" binds a scalar expression to a pattern match\.  Certain
   operations search or modify the string $\_ by default\.  This operator

...
Binary "!" is just like "=" except the return value is negated in the
logical sense.

I would add examples before going on to discuss !. Sure there are
examples of =
at other places on the page, but they are not the basic kind.

Examples are worth 1000 words.

Good ones on perlintro, but missing from =~'s chief documentation
place, perlop.

I think that's what perlretut (regular expresssion tutorial) is for.

--
There's a traditional definition of a shyster​: a lawyer who, when the law
is against him, pounds on the facts; when the facts are against him,
pounds on the law; and when both the facts and the law are against him,
pounds on the table.
  -- Eben Moglen referring to SCO

@p5pRT
Copy link
Author

p5pRT commented Oct 11, 2004

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Oct 22, 2004

From @smpeters

[davem@​iabyn.com - Mon Oct 11 13​:02​:04 2004]​:

On Mon, Oct 11, 2004 at 06​:48​:11PM -0000, Dan Jacobson wrote​:

# New Ticket Created by Dan Jacobson
# Please include the string​: [perl #31937]
# in the subject line of all future correspondence about this issue.
# <URL​: http​://rt.perl.org​:80/rt3/Ticket/Display.html?id=31937 >

perlop says​:

   Binary "=~" binds a scalar expression to a pattern match\.

Certain

   operations search or modify the string $\_ by default\.  This

operator

...
Binary "!" is just like "=" except the return value is
negated in the
logical sense.

I would add examples before going on to discuss !. Sure there are
examples of =
at other places on the page, but they are not the
basic kind.

Examples are worth 1000 words.

Good ones on perlintro, but missing from =~'s chief documentation
place, perlop.

I think that's what perlretut (regular expresssion tutorial) is for.

Agreed, perlretut contains all these examples already.

@p5pRT
Copy link
Author

p5pRT commented Oct 22, 2004

@smpeters - Status changed from 'open' to 'rejected'

@p5pRT
Copy link
Author

p5pRT commented Oct 22, 2004

From @schwern

On Fri, Oct 22, 2004 at 05​:33​:45PM -0000, Steve Peters via RT wrote​:

I think that's what perlretut (regular expresssion tutorial) is for.

Agreed, perlretut contains all these examples already.

perlretut is not mentioned in perlop.

--
Michael G Schwern schwern@​pobox.com http​://www.pobox.com/~schwern/
If all that Americans want is security, they can go to prison. They'll
have enough to eat, a bed and a roof over their heads.
  -- Dwight D. Eisenhower

@p5pRT
Copy link
Author

p5pRT commented Oct 23, 2004

@smpeters - Status changed from 'rejected' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Oct 23, 2004

From @smpeters

On Friday 22 October 2004 01​:28 pm, Michael G Schwern wrote​:

On Fri, Oct 22, 2004 at 05​:33​:45PM -0000, Steve Peters via RT wrote​:

I think that's what perlretut (regular expresssion tutorial) is for.

Agreed, perlretut contains all these examples already.

perlretut is not mentioned in perlop.
OK, if this patch is applied, it will. :)

Steve Peters

Inline Patch
--- perlop.pod.orig     2004-10-23 07:52:48.000000000 -0500
+++ perlop.pod  2004-10-23 07:59:51.000000000 -0500
@@ -219,7 +219,8 @@
 supposed to be searched, substituted, or transliterated instead of the 
default $\_\. When used in scalar context\, the return value generally indicates the success of the operation\. Behavior in list context depends on the particular \-operator\. See L\ for details\. \+operator\. See L\ for details and \+L\ for examples using these operators\.

If the right argument is an expression rather than a search pattern,
substitution, or transliteration, it is interpreted as a search pattern at
run

@p5pRT
Copy link
Author

p5pRT commented Oct 23, 2004

From @smpeters

perlop.diff
--- perlop.pod.orig	2004-10-23 07:52:48.000000000 -0500
+++ perlop.pod	2004-10-23 07:59:51.000000000 -0500
@@ -219,7 +219,8 @@
 supposed to be searched, substituted, or transliterated instead of the default
 $_.  When used in scalar context, the return value generally indicates the
 success of the operation.  Behavior in list context depends on the particular
-operator.  See L</"Regexp Quote-Like Operators"> for details.
+operator.  See L</"Regexp Quote-Like Operators"> for details and 
+L<perlretut> for examples using these operators.
 
 If the right argument is an expression rather than a search pattern,
 substitution, or transliteration, it is interpreted as a search pattern at run

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2004

From @mhx

On 2004-10-23, at 08​:01​:51 -0500, Steve Peters wrote​:

On Friday 22 October 2004 01​:28 pm, Michael G Schwern wrote​:

On Fri, Oct 22, 2004 at 05​:33​:45PM -0000, Steve Peters via RT wrote​:

I think that's what perlretut (regular expresssion tutorial) is for.

Agreed, perlretut contains all these examples already.

perlretut is not mentioned in perlop.
OK, if this patch is applied, it will. :)

Thanks, applied as change #23420.

Marcus

--
Afternoon, n.​:
  That part of the day we spend worrying about how we wasted the morning.

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2004

From @smpeters

The patch was applied, so this ticket is resolved.

@p5pRT
Copy link
Author

p5pRT commented Oct 24, 2004

@smpeters - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant