Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Hints Towards Writing a Module with New Operators

by duelafn (Vicar)
on Dec 20, 2009 at 16:58 UTC ( #813641=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    # IHeartFortran.pm
    package IHeartFortran;
    use strict; use warnings;
    ...
    
    sub EQV()  { __PACKAGE__->new( sub { $_[0] == $_[1] ? 1 : 0 } ) }
    sub NEQV() { __PACKAGE__->new( sub { $_[0] != $_[1] ? 1 : 0 } ) }
    
  2. or download this
    #!/usr/bin/perl
    use strict; use warnings; use 5.010;
    use IHeartFortran;
    ...
    
    say 1 .NEQV. 1;
    say 1 .NEQV. 2;
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://813641]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2021-08-03 02:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)








    Results (32 votes). Check out past polls.

    Notices?