#perl
02 October 2007
Total 34 pages. You are browsing page 34/34.
First :: Prev :: [...] [30] [31] [32] [33] [34] :: Next :: Last
22:20 <****> kelt: $/ = "\r\n";
22:20 <****> then chomp
22:20 <****> chomp() removes a trailing input record separator, if present
22:22 <****> I see for some of the tests it's expecting expected: 'http://perl.dellah.org/WWW-Shorten-1.5.2.tar.gz' yet it's supposed to install 1.97; how do I work around that?
22:22 <****> hmm, is $/ = "\r\n" something chomp knows how to use?
22:22 <****> might also try tr/\r\n//d
22:22 <****> btw ... that works initself ...
22:22 <****> kelt: $/ defines current input record separator
22:22 <****> defines the, even
22:22 <****> okay, cool...
22:23 <****> so I could do like $/ = "," if I wanted it to be commas?
22:23 <****> yes
22:23 <****> neato...
22:23 <****> well thanks...
22:23 <****> Anonycat: I'm not sure that's relevant.
22:24 <****> eval: $s="foobar"; $/="bar"; chomp($s); $s
22:24 <****> pravus: foo
22:24 <****> Anonycat, Understanding how Perl tests work is a prerequisite for debugging them.
22:25 <****> what amount of debugging is even available for CPAN installs?
22:25 <****> Anonycat: It's just perl.
22:26 <****> so, i have a hash that contains keys that have another hash as the value. what's the best way to return a list of keys that have a certain hash-key pair?
22:26 <****> When I say "debugging" here, I don't necessarily mean firing up a debugger program.
22:26 <****> Could simply be that the test is trying to get the longer version of a shortened URL and it's expired.~
22:38 <****> How widely used is WWW::Shorten, and how bad would a force install be here?
22:44 <****> When I use system() the program ends, but system never returns and the perl hangs.
22:44 <****> Anonycat: force installs are generaly a bad idea.
22:44 <****> I tried redirecting output to null, and backgrounding it
22:44 <****> This has no effect
22:51 <****> Anonycat: Run the test scripts individually and determine exactly what functionality is failing. If you don't care if that functionality works, install it.
22:51 <****> Jellorian: Well, no, if the program ended, system would return.
22:51 <****> Jellorian: Unless something else is hanging the script.
23:10 <****> nightly
23:13 <****> hey everyone
23:13 <****> Hi, FXN.
23:13 <****> How's the family?
23:14 <****> i've gotten pp to produce an ELF that runs great on Linux (Debian/x86 and SuSE/x86) -- my problem is -- how do i get it to create something that will run on Solaris (sparc)?
23:14 <****> run it on solaris
23:15 <****> bash: ./hello: Invalid argument
23:15 <****> bash: ELF: command not found
23:15 <****> iank: if only that worked :-P
23:15 <****> "hello" is my .pl
23:15 <****> well - it is an elf rather
23:16 <****> created w/ pp (from my .pl)
23:16 <****> I meant run pp on solaris.
23:17 <****> (sorry :)
23:17 <****> oh.. hmm
23:17 <****> this defeats the purpose for sure
23:17 <****> yrlnry: hi there! quite well in general, Andrea has have a difficult time in her new school (children enter new schools at 3 years here) but this week is getting better, Trini is going to have minor surgery this week as well, nothing serious
23:18 <****> Was she already going to a school before?
23:18 <****> i hate the cpan include hell that comes w/ perl -- if i run pp on solaris i'll need to set that up (along w/ all the cpan modules / versions)
23:18 <****> i wanted pp to take care of that for me :)
23:18 <****> Iris was just promoted from the toddler room to the next room up. The only thing holding her up was toilet training. She was extremely pleased at the move, because the kids and the activities in the toddler room were much too easy for her.
23:20 <****> yep, she went to a kindergarten and was quite happy there, but this new school is a little different, we have no positive feelings about it, looks like a school with older children where the ones at 3-5 years have not much special attention, we are somewhat sad about this because we cannot change her school even paying whatever money we need, there are not vacants
23:21 <****> I am worried, she is not getting there the kind of education I'd like her to get
23:21 <****>{name}), @{$selectors}) );
23:22 <****> I need to get the hash values at key=name out of the array of hashes at reference $selectors :/
23:22 <****> kojiro: why sprintf
23:23 <****> and then insert a comma and newline between each value
23:23 <****> why sprintf?
23:23 <****>{name}, @$selectors)
23:23 <****> it seemed like the best way to print the output
23:23 <****> But you're not printing
23:23 <****> kojiro: look at integral's
23:23 <****> and you're not formatting.
23:24 <****> oh... right, thanks! For some reason I thought I had to put a /command/ in map's first arg
23:24 <****> bash poisoning ;)
23:25 <****> sprintf isn't a "command"
23:25 <****> You can either have a block ("{...}") or just an expression.
23:25 <****> Most stuff in perl that doesn't declare things ends up being an expression.
23:25 <****> danke
23:25 <****> (declare or is a control structure)
23:32 <****> eh
23:32 <****> Where's amnesiac
23:41 <****> he forgot to be here
23:43 * apeiron snickers at the PHP Hacks book having a beanie on its cover, whereas most other Hacks book have tools.
23:48 <****> Would you guys think it reasonable to use a hash like a struct in perl?
23:48 <****> yes
23:49 <****> sure
23:49 <****> definitely
23:49 <****> one thing i like about structs is that the structure is fixed
23:49 <****> so you can't add or remove keys
23:49 <****> but if you don't need that, it works nicely
23:49 <****> (if you do, use a class or Hash::Util::lock_keys)
23:50 <****> nah i just need some options to be returned
23:56 <****> Hi, I'm having an issue with feeding a string to an external program that expects the string to come from STDIN, and reading the output into another string. Usually, I'd use $foo=`mycommand $bar`; , but since mycommand expects $bar from STDIN, I don't know how to solve this. Any suggestions?
23:57 <****> MyNameIsRetro: $foo=`echo $bar | mycommand`;
23:57 <****> or open(KORV, "| mycommand");
23:57 <****> MyNameIsRetro: IPC::Open2
23:58 <****> kll, that's what I tried, but it fails if there are special characters in $bar.
23:58 <****> Geekshitt
23:58 <****> i don't understand a shitt that u're talkin' about
23:58 <****> !!!!!!!!
23:58 <****> MyNameIsRetro: yes, you might have to escape stuff
23:59 <****> MyNameIsRetro: echo '$bar'
23:59 <****> and some escaping
--- Log closed Wed Oct 03 00:00:07 2007
Total 34 pages. You are browsing page 34/34.
First :: Prev :: [...] [30] [31] [32] [33] [34] :: Next :: Last
