nashdj has asked for the wisdom of the Perl Monks concerning the following question:
Which can be done like that, but.. What I had in mind, was treating $_ as a stack. Each time it takes on a new value the stack is pushed up. The previous value could be given the name $__ then $___ and so on, but that could get very messy :) (does perl have something similar already?)...for(@_) { $in .=' '.($t = $_ - $last); $last = $_; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can perl do...?
by athomason (Curate) on Jun 04, 2000 at 13:39 UTC | |
by nashdj (Friar) on Jun 04, 2000 at 13:56 UTC | |
by foobah (Novice) on Jun 04, 2000 at 23:42 UTC | |
by nashdj (Friar) on Jun 05, 2000 at 15:56 UTC | |
by athomason (Curate) on Jun 05, 2000 at 23:17 UTC | |
by nashdj (Friar) on Jun 06, 2000 at 14:01 UTC | |
by chromatic (Archbishop) on Jun 07, 2000 at 02:12 UTC | |
|
Re: Can perl do...?
by sean (Beadle) on Jun 04, 2000 at 19:08 UTC | |
by nashdj (Friar) on Jun 05, 2000 at 11:05 UTC | |
|
Re: Can perl do...?
by takshaka (Friar) on Jun 05, 2000 at 01:39 UTC | |
|
Re: Can perl do...?
by Aighearach (Initiate) on Jun 04, 2000 at 13:47 UTC | |
|
RE: Can perl do...?
by Anonymous Monk on Jun 05, 2000 at 15:13 UTC |