#perl - Fri 20 Apr 2007 between 07:20 and 07:25



f00li5hVSpike: perldoc perlvar
actionCPAN upload: mogilefs-server-2.09 by BRADFITZ
CPANupload: mogilefs-server-2.09 by BRADFITZ
f00li5hVSpike: all the builtin variables are in tehre
bashologistf00li5h: Ok, thank you very much.
f00li5hbashologist: sure, i
i'm good at being a zealot
sbingnersuppose that's not really convenient tho
scrottiesbingner: with IPC::Open2, I still have to copy the output of the first thing in the set of pipes to the second using a loop. And if there are multiple things in the chain, I have to fork and loop on each copying operation. It winds up being a good chunk of code and in bash, there's almost no code required to do it.
actionsbingner nods
sbingnernods
scrottief00lish: foo bar and baz are arbirary Unix programs that take data on STDIN and emit data on STDOUT.
sbingnerscrottie, how about open(OUTPUT, "command1 | command2 |"
)
f00li5hscrottie: i know, i was matching a vague statement with another vague statement
scrottieWell, I'm interested in another advantage of Perl, and that's binary clean interfaces/execve
VSpikef00li5h: thanks
scrottieI want to do open my $f, '|-', 'prog', @args; ... and set up pipes between those.
f00li5hVSpike: sure thing
silisup scrottie
f00li5hscrottie: i don't know, but htere should be
scrottieor similiar with IPC::Open2
hey sili, how goes?
f00li5hscrottie: open my $fh, [program] [thing] [thing]
siliscrottie: purdy good. how about you?
scrottiemeh, alright, I suppose
siliya
VSpikeSo this script does this at the start:
$class = $ARGV[0] || die; shift;
f00li5hscrottie: looks like an alright syntax for it ... i havn't the mastery to do it
VSpikethen a couple more like that for other parameters
siliI'm trying to figure out how to keep my car without paying a riduclous amount each month
scrottieack
f00li5hVSpike: it takes the first argument, (and dies if it's missing) and the disgards the second arg
VSpikeI assume shift shifts the argument array, and the syntax means if the param is missing then die
scrottieif you had a plain, boring car, I'd tell you to sell it and do the flexcar thing.
f00li5hVSpike: shift does just that
VSpikeThe next line is: $sender = $ARGV[0] || die; shift;
f00li5hVSpike: (or shifts the array it's given)
VSpike: use one of the poste bins in the topic
scrottietrying to figure out how to keep stuff, too...
VSpikeYeah sorry, was only gonna paste one line :)

Page: 4 11 18 25 32 39 46 53 60 67 74 81 

IrcArchive