Home Page   #c  #ruby-lang  #cisco  #mysql  #apache  #javascript  #java  #perl  #php  #openmoko   Wallpapers Girl
Reliable $1 Web Hosting by 3iX

Channels


#perl

31 October 2007


Total 28 pages. You are browsing page 28/28.

First :: Prev :: [...] [24] [25] [26] [27] [28] :: Next :: Last

23:11 <****> I'm having some issues with LWP or XML::Simple (not entirely sure). Pastebin: http://rafb.net/p/MqlzxO17.html
23:11 <****> read on filehandle failed: Can't locate object method "read" via package "HTTP::Headers" at (eval 98) line 1. at /usr/lib/perl5/XML/LibXML/SAX.pm line 64
23:12 <****> sputnick: what is @ARG supposed to be?
23:12 <****> found it, never mind
23:12 <****> n8
23:18 <****> thanks , that's ok now, but how knows the equivalent of "basename" from bash in perl ?
23:18 <****> perldoc File::Basename
23:18 <****> s/how/who
23:20 <****> I want to replace URLs like this foobar.com except for URLs like foobar.com/notfoo. How do I specify a replacement that says unless this exists, and do it globally in a string?
23:22 <****> for example $foo = "foobar.com www.foobar.com/adasd www.foobar.com/notfoo "; $foo =~ s/foobar\.com/barfoo\.com/gi; I want to make the resultant string be : "barfoo.com www.barfoo.com/adasd www.foobar.com/notfoo"
23:22 <****> So, the last one is unchanged.
23:22 <****> hi
23:23 <****> Perl is used at lexmark - http://www.lexmark.com/cgi-bin/MD/md.cgi?func=supplies&lang=0&prtr=4476005&ctry=00000409&os=5&src=1&C1=51&L1=21&C2=30&L2=26
23:23 <****> :)
23:23 <****> schemelab's url is at http://xrl.us/7xw3
23:23 <****> horrible way to find out
23:23 <****> are nested eval's handled correctly or is there some gotcha? I did some tests and it seems to behave as expected (an eval {}; if ($@) { ... within another eval seems to work), but I wanted to make sure
23:24 <****> I think I want (?!notfoo) in there.
23:26 <****> year, that's rocks now :)
23:26 <****> with basename too :)
23:32 <****> how do I determine the type of an item in a hash?
23:32 <****> type?
23:32 <****> perl has no types
23:33 <****> ref ?
23:33 <****> dkr: it's always either null or SCALAR
23:33 <****> luke-jr: thats because hash values are SCALARS
23:33 <****> perl has several types
23:34 <****> I need to determine if the hash value is itself a REF or not
23:34 <****> bpalmer: i meant in the traditional sense, i think. $foo and @foo are different constructs, rather than types
23:34 <****> use ref()
23:34 <****> how can i open programs and capture their output under windows with open() ?
23:35 <****> ref($hash{item}) returns null either way
23:35 <****> ref(\$hash{item}) returns SCALAR either way
23:35 <****> the following does work on linux but not on windows
23:35 <****> http://pastebin.com/m18dd17a7
23:35 <****> yotta: The paste m18dd17a7 has been copied to http://erxz.com/pb/5055
23:36 <****> eval: $foo = []; $bar{foo} = $foo; [ ref( $foo), ref($bar{foo}) ]
23:36 <****> imMute: ['ARRAY','ARRAY']
23:36 <****> $a]; ref($b{x});
23:36 <****> luke-jr: ''
23:36 <****> luke-jr: buubot disagrees
23:36 <****> luke-jr: wrong
23:36 <****> it does output nothing at all...
23:36 <****> you dont set up hashes like that
23:36 <****> $a; ref($b{x});
23:36 <****> luke-jr: ''ERROR: syntax error at (eval 238) line 1, at EOFMissing right curly or square bracket at (eval 238) line 1, at end of line
23:37 <****> oops
23:37 <****> eval: my $a = 5; my %b = [qw/foo bar/]; \%b
23:37 <****> undef}
23:37 <****> thats what that hash looks like
23:37 <****> $a); ref($b{x});
23:37 <****> luke-jr: ''
23:37 <****> $a]; ref($b{x});
23:37 <****> luke-jr: ''
23:37 <****> STOP THAT
23:37 <****> eval: ref(5)
23:37 <****> imMute: ''
23:37 <****> duh
23:37 <****> the first one was right, you just didnt realize it
23:38 <****> quit
23:38 <****> eval: $a = 5; $b{x} = $a; ref($b{x});
23:38 <****> luke-jr: ''
23:39 <****> eval: $a = 5; $b{x} = \$a; ref($b{x});
23:39 <****> luke-jr: SCALAR
23:39 <****> hm
23:39 <****> eval: ref( \'5' )
23:39 <****> imMute: SCALAR
23:39 <****> not so many windows users in here i guess...
23:41 <****> wtf
23:41 <****> oh.
23:42 * CPAN upload: WebService-Google-Reader-0.04 by GRAY
23:43 <****> crap
23:44 <****> i have a hashref that sometimes contains keys and values and other times just contains a string.
23:45 <****>{key}) and the value has a string in it....
23:45 <****>") as a HASH ref while "strict refs" in use at parse_unsubscribe_templates.pl line 24.
23:45 <****> initself: s/hashref/scalar/
23:45 <****> LOL .. HAPPY HALLOWEEN : http://photo.darkness.com/files/1/Photo%2015.jpg <-- lol
23:46 <****> ok, a scalar that sometimes contains key/value pairs and other times contains a string.
23:46 <****> TapoutT: not funny.
23:46 <****> strange. when I upload with a client like lftp, all is ok, my pictures are consistent. but sometimes when I use my script, the pictures are corrupted. the browser said : The image "http://stardust.3.free.fr/guest/tofes/konsole-bad.png" cannot be displayed, because it contains errors. my script : http://pastealacon.com/125
23:46 <****> maybe i need if (ref($r) eq "HASH") {
23:46 <****> no, that's not gonna do it
23:47 <****> sputnick, binmode
23:49 <****> REF
--- Log closed Thu Nov 01 00:00:05 2007


Total 28 pages. You are browsing page 28/28.

First :: Prev :: [...] [24] [25] [26] [27] [28] :: Next :: Last


Tutti i nuovi CAP Italiani. Come ottenere il database completo