Sextalk according to the cult of Perl - Fortune [possible satire]

krangHey all, what's the best way to call one perl script from another? I was thinking I'd just use 'system("script.pl");'
dazjorzkrang: yeah, that, or do "script.pl"
dazjorzkrang: depends on how separated you want them to be
krangdazjorz: you mean just a line that has "script.pl"; written on it?
Khisanthyou need the do as well
dazjorzkrang: no, exactly this: do "script.pl";
rindolfkrang: system is usually what you want.
rindolfkrang: normally require or use are preferable to do
dazjorzrindolf: that's for modules, isn't it ?
rindolfdazjorz: yes.
dazjorzwait, I think require "script.pl" would work too
rindolfdazjorz: and doing code is not such a good idea.
dazjorzrindolf: hmm?
krangrindolf: what is doing anyway?
rindolfdazjorz: I mean "perldoc -f do"-ing code.
rindolfkrang: do()-ing
rindolfkrang: it reads the file and evaluates it.
rindolfkrang: perldoc -f do.
dazjorzrindolf: ah
dazjorzrindolf: do {}
* rindolfwould rather be doing hot models than doing code. :-)
dazjorzrindolf: yeah, do BLOCK is quite useless
dazjorzheh
rindolfdazjorz: you can do my $var = do { ... }
* dazjorzwould rather be doing GumbyBRAIN than doing code
GumbyBRAINand doing code is not be in the days of immortality!
rindolfdazjorz: or eval { ... }
rindolfdazjorz: heh.
rindolfIt's hard to do code.
dazjorzdo $model;
dazjorzeh.. sorry, do $hotmodel;
rindolf"Are you into my brother?"
rindolf"No I'm totally into Perl."
krangah ok, I see. Thanks guys!
rindolfkrang: yw.
dazjorzheh :-)
rindolfIf you want a configuration file, you should be using something like INI, YAML, etc.
rindolfXML perhaps.
rindolfSomething.
rindolfApache-like config.
dazjorzApache-like is very strong but hard to parse, right ?
dazjorzLoading and saving configuration never looks good, especially when it's XML
dazjorzthe code to load and save is ugly.
Channel#perl
NetworkFreenode
TaglineSextalk among Perl cultists
Published2009-12-14