#perl - Mon 26 Mar 2007 between 16:34 and 16:38

NY Lost Funds



cobar_integral: any ideas?
integralOr the URI module of course.
cobar_: huh?
dkrSniper_jo: URI::Escape
hobbsharleypig: uh.
harleypig: you're failing to make sense
Sniper_jointegral: how do i use the URL::Encode module ?
integralharleypig: "or similar"? Stop smoking that.
stuufSniper_jo: rtfm
harleypig:/ I couldn't remember the name.
integralSniper_jo: I said "URI::Encode". It has documentation.
hobbsharleypig: you say clearly that this is a "standalone script" and you want to call it from _another_ script
dkrSniper_jo: if you want to know how to use Foo, you type perldoc Foo :)
integralharleypig: since when do perl modules have a "_" in the name?
hobbsharleypig: that means exec. period. Or else you need to change your question.
Sniper_joahh
dkrit's nto URI::Encode, though, it is URI::Escape
cobar_integral: if i run exec("echo 1 2 3"); under microperl i get output, if i run exec("echo '1 2' 3"); i get no output
Sniper_joperldoc URL::Escape
dkrs/L/I/
cobar_integral: i'm trying to avoid doing tons of work learning exec+fork if that's not going to work
integralcobar_: You're probably best not relying on a shell working.
cobar_: You should use the lsit form LIKE YOU WERE BEFORE.
Sniper_joperldoc open
harleypighobbs: No, I don't want to call it from another script. That's what we're doingnow. I want to make a simple change *in that script* so that print or print STDOUT will be redirected to a variable without modifying the rest of the script.
dkrSniper_jo: not here. at your shell prompt
cobar_integral: ahhh, i think i see what you're saying now
Sniper_joiohh lol oops ok thanks
Caelumharleypig: reopen STDOUT to a scalar
hobbsharleypig: okay... so it's in a variable. And then the script is over.
integralcobar_: my $pid = fork; if ($pid) { "parent"; waitpid $pid; } elsif ($pid == 0) { open STDOUT, ...; exec("a", "b") } else { die }
Is that difficult?
hobbsharleypig: you're leaving something out here
harleypig? Not intentionally.
Oh. We're modifying around the guts of the scirpt, but we don't want to touch what it already does.
cobar_integral: thx
harleypigWe're trying to turn it into a module.
integralcobar_: What is this "thx"? Insincere idiot.
hobbsharleypig: okay, so open and select should do it, like I said a while back. Unless you're doing anything particularly odd.
integral: George Lucas knows.

Page: 2 9 16 23 30 37 44 51 58 65 72 79 86 93 100 107 114 121 

IrcArchive

NY Lost Funds