#apache #archlinux #asterisk #centos #debian #gentoo #haskell #kde #kubuntu #lisp #math #mysql #perl #python #ruby-lang #rubyonrails #suse #ubuntu #vim #wikipedia 0 1 2 3 4 5 6 7 8 9 10 11 12 
Top Prev 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 6214 6215 6216 6217 6218 6219 6220 6221 6222 Next

#perl

<Elly> I think maybe you want
<cfedde> Gnomer__: this is some frag from somehting larger. Make a small but otherwise complete sample that exhibits the problem you are trying to solve.
<Elly> print md5_hex for split(/ /,chomp(<>))
<cfedde> If after creating the sample you are still having the problem come back and show us.
<revdiablo> Elly: Good effort, old chap
<revdiablo> Elly: perldoc -f chomp
<Gnomer__> cfedde, it's literally just taking input and putting it + md5 in a file
<revdiablo> Gnomer__: Show us what it's "literally" doing
<Elly> revdiablo: what should I be seeing?
<Gnomer__> revdiablo, yep. One sec.
<revdiablo> Elly: What is chomp's return value? It doesn't seem like it is what you expect.
<Elly> Gnomer__: you don't need to escape spaces in regexes or match the entire thing
<Elly> you can just do if ($test =~ / /)
<cfedde> eval: use Digest::MD5 'md5_hex'; md5_hex("revdiablo, yep. One sec");
<buubot> cfedde: Error: Can't locate Digest/MD5.pm: Too many open files at eval line 1. BEGIN failed--compilation aborted at eval line 1.
<Caelum> unfortunately chomp doesn't work how it should work
<Elly> oh
<Elly> that's lame
<Elly> well
<Elly> hm
<Elly> not sure how to oneline it then
<revdiablo> You could use List::MoreUtils and apply { chomp } <>
<revdiablo> But that would be cheating!
<Elly> hm
<Elly> heh
<Daveman> ;p
<Daveman> :D
<Caelum> so that could be: while (<>) { chomp; print map { md5_hex $_ } split ' ' } # or something
<Daveman> :D
<dazjorz> ouch, why did you do that?
<Elly> tch
<Elly> that looks like a semicolon
<Daveman> Gumbybrain: Pimp your Elly?
<GumbyBRAIN> what is your problem with lwp is much better.
<Daveman> o_O
<Elly> if you're gonna allow those
<dazjorz> I see the Matrix in my SSH client.
<dazjorz> thoooouuuusands of lines scrolling constantly
<thrig> C-c can fix that
<dazjorz> I know, but it's good
<dazjorz> it's installing and stripping stuff
<Gnomer__> revdiablo, http://pastebin.ca/369905
<buubot> The paste 369905 has been copied to http://erxz.com/pb/1515
<tomboy> :-D
<mauke> T M I A O
<mauke> H A X S U
<mauke> E T
<mauke> R H Y
<Gnomer__> The only difference in the code that generated that is "print FH "$test - $md5\n";"
<Daveman> o_O

Previous Page  Next Page

Search ircarchive.info