#perl - Tue 1 May 2007 between 05:46 and 05:59



bpalmerdoes it also add shell built-ins?
pkunduactually I have a shell where if you type "?" it returns help
alephnullpkundu: oh, and aliases and shell functions too.
Paladin`pkundu: you'd have to manually go through the $PATH and get all files, then test each one for +x
bpalmerpkundu: well, you have two options: do what the shell does, or have an inferior shell running you provoke into doing what you want, and you present its output somehow
actionBinGOs provokes GumbyBRAIN
BinGOsprovokes GumbyBRAIN
GumbyBRAINgumbybrain wants to kill policy.
pkunduhmm
SubStackperl -e'print join "\n", <$_/*foo*> for split /:/, $ENV{PATH}'
or similar
pkunduok thank :(
:)
Zabaeval: sub test{return %(test => "blah);} print test();
buubotZaba: Error: Can't find string terminator '"' anywhere before EOF at eval line 1.
Zabaeval: sub test{return %(test => "blah");} print test();
buubotZaba: Error: syntax error at eval line 1, near "%(test"
Zaba.
how do i make an anonymous hash?
or well
Paladin`Zaba: {}
Zabaor array
ahh
actionZaba sucks
Zabasucks
Paladin`Zaba: {} creates an anonymous hash reference.. is that what you meant?
Zabayeah
and () for array
Paladin`Zaba: no.. [] creates an anon array ref
Zabaorly?
why does () work?
Paladin`, is () and [] same then?
memoweWhere does it "work"?
SubStackone returns a reference, one returns a list
Prof_Vinceperlbot references > Zaba
Zabahm
I need to return a list of values, Duh
memowe@list_of_values = qw( foo bar baz ); return @list_of_values
() doesn't make lists - context makes lists.
BinGOshint, subs return either a scalar or a *list* dependent on the context in which they were called.
Zabaeval: sub test1 { return ("blah", "blah"); } sub test2 { return ["blah", "blah"]; } print test1(); print "\n"; print test2();
buubotZaba: blahblah ARRAY(0x8643fa8) 1

Page: 5 12 19 26 33 40 47 54 61 68 75 82 89 96 103 

IrcArchive