in reply to Sorting The Date format Values without using any perl modules.

Pray, please tell us why you are not allowed to use any modules or the split function?

I can understand that in some companies you are not allowed to install any odd module on your system, but not using a built-in function? It is like saying: "please add this list of figures but don't use +!"

CountZero

"If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

Replies are listed 'Best First'.
Re^2: Sorting The Date format Values without using any perl modules.
by eric256 (Parson) on Dec 26, 2005 at 20:24 UTC

    No + or =

    sub add_em { my $sum; for (@_) { for (1..$_) { $sum--; } } return -$sum; } print add_em(1..5);

    Sorry just couldn't resist ;)


    ___________
    Eric Hodges
      No +, - or =:
      print sum(1..10); sub sum { return scalar map { 1..$_ } @_ }

      s$$([},&%#}/&/]+}%&{})*;#$&&s&&$^X.($'^"%]=\&(|?*{%
      +.+=%;.#_}\&"^"-+%*).}%:##%}={~=~:.")&e&&s""`$''`"e