| mofino | (fine) OK! |
| Aankhen`` | jseval: var @foo = qw/a b c d/; $foo[-1] |
| buubot | Aankhen``: Error: Error: SyntaxError: illegal character at line 0: var @foo = qw/a b c d/; $foo[-1] |
| dngor | Same as ever, only a little less crazy. |
| Aankhen`` | Eh. |
| amnesiac | oh, wait all but -1, well still |
| sili | Aankhen``: first, you're not allowed to use c-style for loops in perl unless you have a really good reason. |
| Aankhen`` | eval: my @foo = qw/a b c d/; $foo[-1] |
| buubot | Aankhen``: d |
| dngor | Not that most people would notice. :) |
| mofino | dngor, that's good. Good to see you're still around, and alive. Alive is always nice. |
| Aankhen`` | sili: I know, I just wasn't sure what to use instead... |
| amnesiac | hi dngor! |
| mofino | dngor, they would notice if you disappeared. |
| sili | Aankhen``: second, element all elements but the last element? do_something for 0..$#array-1 |
| pheorehs | hello there |
| dngor | mofino: We could test that... :] |
| Aankhen`` | Hmm. |
| sili | err, modify all elements except the last* |
| mofino | life++ |
| Aankhen`` | jseval: my @foo = qw/a/; $_ .= "bzzt" for @foo[0 .. $#foo - 1] |
| buubot | Aankhen``: Error: Error: SyntaxError: illegal character at line 0: my @foo = qw/a/; $_ .= "bzzt" for @foo[0 .. $#foo - 1] |
| Aankhen`` | Gah. eval: my @foo = qw/a/; $_ .= "bzzt" for @foo[0 .. $#foo - 1] |
| buubot | Aankhen``: |
| Aankhen`` | eval: my @foo = qw/a/; $_ .= "bzzt" for @foo[0 .. $#foo - 1]; [ @foo ] |
| buubot | Aankhen``: ['a'] |
| sili | Aankhen``: or even for(@foo[0..$#foo-1]) {...} |
| Aankhen`` | Oh, excellent. |
| mofino | man |
| Aankhen`` | Thank you. I did think of that, but for some reason I didn't think it would work. Serve me right for not trying it... |
| leku | randal: How do I get an account of $aoa[X] now? I do scalar($aoa[0]) and it returns a ref to ARRAY |
| pheorehs | got a programming problem, here is what I want to do, I have the chars (a-z, A-Z, 1-9), and I want to generate every combination of those characters up to say 4 or more characters long. so I want to see , aBx as well as Zqqq or just plane F, does something like this already exist, if not, whats the best way to go about it, recursive function scripting is giving me a headache. any ideas ? |
| mofino | coming in here reminds me how fun perl is. and all the wack jobs that come with it. |
| sili | pheorehs: HOORAY FOR SEQUENCE GENERATION |
| metalfan | hi |
| mofino | (perl community of mental patients)++ |