IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Here is the same code, commented
\n#!/usr/bin/perl -p\n# The -p switch, as explained in perlrun, reads each\n# line into $_, runs your code, then prints $_.\n# More precisely it puts a loop like this around your\n# code:\n#\n#   LINE:\n#     while (<>) {\n#       ...             # your program goes here\n#     } continue {\n#       print or die "-p destination: $!\\n";\n#     }\n#\n# The -p switch allows you to edit lines on the fly by\n# editing $_.\n#\n# Previously I used -e to allow the program to go on\n# the command line, but this time around I am not\n# doing that.\n\nif (\n  /              # This regular expression matches:\n    ^            #   the start of the string\n    foo          #   then foo\n    (\\d+)        #   then some digits, put in $1\n    =            #   an = sign\n    (.*\\n)       #   other junk, including a return\n                 #     that go into $2.\n  /x             # /x turns on commenting.\n                 # (since no variable is bound to the\n                 # match it matches $_ - which is\n                 # conveniently your current line.)\n) {\n  # OK, we matched.  If we have not yet come up with\n  # a replacement for foo4, then set it to $2.\n  $r ||= $2;\n  # If this is foo4, then replace $_ (the new value is\n  # what we'll print).\n  $_ = "foo4$r" if 4 == $1;\n}\n

Cheers,
Ben
I have come to believe that idealism without discipline is a quick road to disaster, while discipline without idealism is pointless. -- Aaron Ward (my brother)
New thank you very much
knowing how it works sort of is no where near as good as knowing exactly why it works so can put that to use elsewhere,
thanx,
bill
All tribal myths are true, for a given value of "true" Terry Pratchett
[link|http://boxleys.blogspot.com/|http://boxleys.blogspot.com/]

Any opinions expressed by me are mine alone, posted from my home computer, on my own time as a free american and do not reflect the opinions of any person or company that I have had professional relations with in the past 48 years. meep
questions, help? [link|mailto:pappas@catholic.org|email pappas at catholic.org]
     scripting skills are muy rusty(edited for fsckin tttags) - (boxley) - (9)
         Flippin' 'eck, box. - (pwhysall) - (4)
             WTF are you doing up at this ungodly hour? Go back to bed! -NT - (CRConrad) - (3)
                 Up'n'at 'em, that's me! -NT - (pwhysall) - (2)
                     Shudder. -NT - (CRConrad) - (1)
                         Pervert. -NT - (pwhysall)
         Use Perl. - (ben_tilly) - (3)
             have time for some education? - (boxley) - (2)
                 Here is the same code, commented - (ben_tilly) - (1)
                     thank you very much - (boxley)

ONE THE MACHINE!
67 ms