@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25



Comments:

<0> Ani-_, look
<0> popup_menu( -name=>'select', -values=>\@display_files ),
<0> that how i dipslay the files
<0> i take them from an array
<0> my @files = <../data/text/*.txt>;
<0> my @display_files = map /([^\/]+)\.txt/, @files;
<1> Yaakov, how?
<2> Then use utf8::encode on each element in @display_file.
<0> iam not actually printing them
<0> by using a print statement
<0> print h1( {cl***=>'lime'}, " => ",
<0> popup_menu( -name=>'select', -values=>\@display_files ),
<0> submit(''));
<2> What was said about pasting?
<0> umm sorry
<3> "but it's only three lines of incomprehensible greek!"



<0> the value of of pop form element is an array
<0> caontaing the all greek files
<4> tziOm: perldoc URI
<2> I do not care. Write a loop that goes process each element of display_files and call utf8::encode on it. And put the encoded value in the array.
<0> i think its easier try to print just a signle file
<0> to see if the utf8 works
<0> or maybe
<0> popup_menu( -name=>'select', -values=>\@utf8::encode(display_files) ),
<5> wow
<0> will that work?
<5> aparently php has curl_ functions built in
<5> now that is nifty.
<0> popup_menu( -name=>'select', -values=>utf8::encode(@display_files) ),
<6> EvanCarroll: it also has fopen($url) which is kinda Evil.
<2> I doubt it
<6> EvanCarroll: some people use it to open URLs and then people can p*** in "/etc/p***wd" or whatever.
<0> no it didnt
<7> -values => [ utf8::encode(@display_files) ]
<5> rindolf: That isn't evil, its convienent
<7> you need an array reference
<7> but I don't even know if utf8::encode() works like that
<0> Ani-_, ill try this: print utf8::encode($display_files[1]);
<7> no, it doesn't
<7> utf8::encode() takes strings only, and changes them IN-PLACE, it doesn't return anything
<7> you'd have to write your own function to change a list of strings and return them:
<7> sub encode_list { my @str = @_; utf8::encode($_) for @str; return @str }
<7> then you can do:
<0> ye sit doesnt return anything
<7> ... -values => [ encode_list(@strings) ]
<6> EvanCarroll: thing is it can open both files *and* URLs. So you have to check that a file is not a URL and a URL is not a file.
<7> and ALL will be well in the world
<6> EvanCarroll: perl's open does not accept URLs.
<5> rindolf: Thats because perl isn't as full featured. obviously.
<0> japhy, Global symbol "@strings" requires explicit package name at D:\www\cgi-bin\index.pl line 29.
<5> PHP makes an php_open() call to the kernel which calls the internet and opens the web page... thats pretty cool.
<7> ^Nikos: sigh. please. change the variable's name to the one YOU'RE USING
<0> ooops sorry
<7> geez.
<6> EvanCarroll: Perl is full-featured enough if you're using the right CPAN modules.
<0> my mistake
<5> rindolf: you're being to serious.
<6> EvanCarroll: oh! You were joking?
<5> rindolf: Not at all, forget the last line about being serious.
<0> wwwoooow!
<5> PHP is only faster because of SIGPHP
<6> EvanCarroll: OK.
<0> now wwe have an entirely different encoding!
<0> nikos.no-ip.org
<8> anybody know a good Perl IDE for Windows?
<0> look how it looks :)
<9> hello im a newbie in perl
<6> perlbot: perl ide
<1> how can I next get next from a loop inside a if in the loop?
<6> shyboy: hi! Welcome to #perl.
<10> zido: Notepad2
<6> perlbot: IDE
<2> tziOm: perldoc -f next maybe?
<11> next. To access this perldoc please type, at a command line, 'perldoc -f next'. You may also find it at http://perldoc.perl.org/functions/next.html
<6> zido: there's Eclipse, and Komodo.
<10> Ani-_: i think he means the next element in the list being looped



<6> zido: I'm using gvim.
<6> zido: there's also Emacs.
<8> hmm, eclipse works for Perl? :D
<6> zido: it has a Perl environment.
<0> japhy, ?
<6> zido: kdevelop too, but it's UNIX-centric.
<7> ^Nikos: yes?
<2> immute, that is indeed another possibility. It's ofcourse hard to tell if it is asked that way
<0> umm did you see how it lloks
<0> ?
<8> rindolf: gvim works under windows?
<2> ^Nikos: try with decode instead of encode
<7> I don't know anything about UTF encoding. I don't even know what you were trying to do in the first place
<12> does perl have true/false?
<0> Ani-_, ok
<6> zido: sure, and on many other platforms.
<7> gr00ber: yes, but not 'true' and 'false'
<12> no?
<6> zido: well maybe not gvim, but vim at least.
<9> what is the better website to learn perl esealy
<7> gr00ber: 0, "", undef, and "0" are false
<2> gr00ber: ofcourse. true is not false and false is no true.
<7> everything else is true
<12> japhy, i see
<12> thx
<2> japhy, so an empty array/list is true? :)
<0> nothing!
<0> now we have a different encoding
<8> ok, but, for eclipse.. I've installed eclipse allready, and now i installed ActivePerl.. Any HOWTO to get Eclipse to work with it?
<13> Ani-_: no, an empty array is equal to zero in scalar context, and 0 is false ;)
<6> zido: I'm not aware of any. Let me google.
<7> Ani-_: true and false are scalar quanities
<8> rindolf: doing it ^^
<6> zido: http://e-p-i-c.sourceforge.net/
<2> in that case you are right...
<7> yes. yes I am.
<7> I'll take that $20 now.
<6> perlbot: eclipse perl is EPIC - Eclipse Perl Integration - http://e-p-i-c.sourceforge.net/
<14> added eclipse perl to the database
<15> hey
<15> is there a way to join two hashes?
<7> jedix: sure.
<6> perlbot: IDE is Komodo, Eclipse, KDevelop, X/GNU Emacs, gvim.
<14> added IDE to the database
<6> jedix: use the comma.
<6> jedix: make sure you flatten them first.
<6> jedix: in case they are references.
<7> @that{keys %this} = values %this;
<2> Only $20?
<15> I'm trying to use the hashes to ensure the elements are unique
<7> jedix: ok.
<7> that's a good use for hashes.
<0> Ani-_, any other advice?
<15> so I was going to return arrays, but figured hashes were better
<15> so the function will be called an unknown number of times, but I only want to have it in the hash once..
<16> returning either are sux
<16> return references
<15> well, yeah
<0> sorry for giving you hard time
<0> but this stuff is torchering me over a wekk
<0> week
<8> rindolf: thanks alot, works great :)
<0> anohter thign is that if in my browser i select e differtn encoding to see my webpage
<2> ^Nikos: try by creating a popup_menu with some predefined/consant values... That is, not a list of filenames
<0> for example greek iso-8859-7
<0> then the drop down menu its dispayed proeperlyt
<0> abbut all other greek reversed!
<0> Ani-_, this is nto the problem
<0> look what i typed please
<0> if i cnages encodign to greek then drop down menu looks perfectly in greek
<0> but all other greek stuff looks weird!
<0> things are reversed
<15> japhy: so `that` is my hash?
<6> zido: what does? EPIC?


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #perl
or
Go to some related logs:

#gentoo
dysprosia
#perl
#php
hpiod Connection reset by peer
xubuntu configured improperly
authorized_submit_users
blob equivalent SQL Server
#lisp
#gimp



Home  |  disclaimer  |  contact  |  submit quotes