| cobar_ | integral: any ideas? |
| integral | Or the URI module of course. cobar_: huh? |
| dkr | Sniper_jo: URI::Escape |
| hobbs | harleypig: uh. harleypig: you're failing to make sense |
| Sniper_jo | integral: how do i use the URL::Encode module ? |
| integral | harleypig: "or similar"? Stop smoking that. |
| stuuf | Sniper_jo: rtfm |
| harleypig | :/ I couldn't remember the name. |
| integral | Sniper_jo: I said "URI::Encode". It has documentation. |
| hobbs | harleypig: you say clearly that this is a "standalone script" and you want to call it from _another_ script |
| dkr | Sniper_jo: if you want to know how to use Foo, you type perldoc Foo :) |
| integral | harleypig: since when do perl modules have a "_" in the name? |
| hobbs | harleypig: that means exec. period. Or else you need to change your question. |
| Sniper_jo | ahh |
| dkr | it'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_jo | perldoc URL::Escape |
| dkr | s/L/I/ |
| cobar_ | integral: i'm trying to avoid doing tons of work learning exec+fork if that's not going to work |
| integral | cobar_: You're probably best not relying on a shell working. cobar_: You should use the lsit form LIKE YOU WERE BEFORE. |
| Sniper_jo | perldoc open |
| harleypig | hobbs: 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. |
| dkr | Sniper_jo: not here. at your shell prompt |
| cobar_ | integral: ahhh, i think i see what you're saying now |
| Sniper_jo | iohh lol oops ok thanks |
| Caelum | harleypig: reopen STDOUT to a scalar |
| hobbs | harleypig: okay... so it's in a variable. And then the script is over. |
| integral | cobar_: my $pid = fork; if ($pid) { "parent"; waitpid $pid; } elsif ($pid == 0) { open STDOUT, ...; exec("a", "b") } else { die } Is that difficult? |
| hobbs | harleypig: 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 |
| harleypig | We're trying to turn it into a module. |
| integral | cobar_: What is this "thx"? Insincere idiot. |
| hobbs | harleypig: 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. |