@# 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 26 27 28 29 30 31 32 33 34 35 36 37



Comments:

<0> or use relative paths
<1> "pwd"
<2> pwd isn't useful since it returns the path local to the executing user
<2> it will break if the script is called with an absolute path
<0> GumbyBRAIN: holy **** Red King crabs can weigh up to 12 kilos
<3> of course you can use it in to a .223 and not kilos.
<0> and be 2 meters in size!
<4> configuration file?
<5> is it possible to have a hash of objects? if so, how would you access a method in a hash of objects?
<4> $ENV{PWD} + $0
<6> Avochelm: $persons{john}->eat()
<4> or not
<5> zamolxes, when i try something similar to that i get "Global symbol "$sth_cdrput" requires explicit package name at ./movecdr.pl line 89."
<0> who here would love a 30 pound crap thats as big as you for dinner?



<6> Avochelm: well maybe $sth_cdrput is not declared?
<6> Avochelm: perldoc -f my :)
<7> Avochelm: Type 'perldoc -f my' in your shell or go to http://perldoc.perl.org/functions/my.html
<8> I am trying to do /usr/bin/perl -MCPAN -e 'install "DBD::mysql"'... I need to change testp***word (default ) =
<5> zamolxes, i do declare it... my code is at http://sial.org/pbot/18372
<6> Avochelm: $sth_cdrput->
<6> Avochelm: that is dereferencing
<9> Hi !
<6> Avochelm: you have no $sth_cdrput reference, only a %sth_cdrput hash
<9> How am I supposed to read data from a IO::Socket::Inet ? I tried while(<$sock>) unsuccessfully>>>
<5> so, i have to create a reference of the hash?
<6> Avochelm: you are using a hashref. Do you want a hashref or a hash? If you want a hash don't dereference. perldoc perlref
<7> Avochelm: Type 'perldoc perlref' in your shell or go to http://perldoc.perl.org/perlref.html
<5> zamolxes, thanks for the clue :)
<6> welcome
<10> Axioplase: did you look at $sock->recv()
<9> Mzala, nope. Now I will
<11> i'm trying to do a print <<ENDCARD; but perl is saying Use of uninitialized value in concatenation (.) or string -- at that line
<11> what is the problem, exactly?
<11> ah found it
<12> heheh
<13> anyone ever setup RT?
<14> plenty.
<14> it's easy.
<1> no, not even the people that have :)
<13> doug: every time i navigate to a new page, it's asking me to login again
<13> doug: any ideas?
<15> hi all
<15> http://pip.one09.net/files/txt/e6ffa737f47501902f44d6504dab383d.txt
<16> pippijn's url is at http://xrl.us/o29a
<15> how can this be made easier?
<15> or prettier
<15> I was thinking of a hash of hashes but I don't know how to do it
<15> everything I tried failed
<15> http://htmlfixit.com/cgi-tutes/tutorial_Perl_Primer_014_Advanced_data_constructs_A_hash_of_hashes.php
<16> pippijn's url is at http://xrl.us/o29b
<17> can someone tello me the name of module i could use to define static variables, totaly skippied my mind. Something like use define(VAR, VAL)
<18> use const
<17> thanks
<19> eval: %foo = (1 => { one => 1, two => 2, }, 2 => { three => 3 },); $foo{2}{three};
<7> eggzeck: 3
<19> pippijn: ^^
<15> right
<20> All of a sudden I see a <script></script> tag on the top of all my site's pages. The script tires to use IE's badness to run an executable from a remote site, to install a virus no doubt. Do I have the right to try to DOS the server which he maliciously inserted script tires to DL & Run the executable from?s
<15> ah :)
<20> s/s$//;
<15> but eggzeck I have a variable first argument
<20> isn't that considered self defense?
<4> history -c
<4> hmm
<15> eval: $foo{1} = { one => 1, two => 2, };
<7> pippijn: {'one' => 1,'two' => 2}
<15> ...
<15> ah
<15> seems to work with { }
<19> pippijn: Do you know what { ... } does?
<15> no
<15> what does it do?
<4> i wonder what human tastes like
<19> pippijn: It's an anonymous hash and creates/takes a reference to that hash in $foo;
<15> so...



<15> this:
<4> perlbot: references
<21> http://www.shlomifish.org/Vipe/lecture/Perl/Newbies/lecture2/references/, http://perl.plover.com/FAQs/References.html, perlref, perlreftut, perldsc, perllol
<4> read those.
<15> http://pip.one09.net/files/txt/26fe7e781282f1f82a19de3482c17a84.txt
<16> pippijn's url is at http://xrl.us/o29c
<15> and this:
<15> http://pip.one09.net/files/txt/50ca2ba000f6639c34d6fb434806fe57.txt
<16> pippijn's url is at http://xrl.us/o29d
<15> would be the same?
<19> eval: $foo = { one => 1, two => { three => 3, four => 4, }, five => 5 }; $foo->{two}{three};
<7> eggzeck: 3
<19> pippijn: ^^
<4> pippijn: more or less
<15> ah :)
<15> sili_: I can in the end do:
<15> print $user{$ARGV[0]}{p***word};
<15> as long as I can do that it's fine with me
<4> tias
<4> perlbot: tias
<21> Try It And See: the best way to learn if something works.
<15> yes
<15> you didn't have to perlbot that :)
<22> so this dosnt make sense right? %foo={a=>'1',b=>'2'}; ?
<22> you would have to make foo a variable ($foo) and reference it like %$foo (?)
<23> holst: right
<24> $foo = {a=>1,b=>2};
<22> nice, think i got something :)
<24> %foo = (a=>1,b=>2);
<23> though I guess in perl6 the distinction between compound variables and references breaks down a bit
<19> references fit where ever a scalar fits
<19> having a reference as a hash key would not work
<19> holst: But you can do this (as I showed before): %foo = (one => { hi => "HI", bye => "BYE", },); $foo{one}{bye};
<22> hmm
<25> hello
<22> but what if the element that one points to is a hash?
<22> and not a reference to a hash
<22> would that make any sense?
<26> No.
<25> newbie of perl,any good tutorials?
<24> perlbot: tutorial
<21> http://perlmonks.org/index.pl?node=Tutorials | http://perl.com/cs/user/query/q/6?id_topic=74 | http://learn.perl.org/ | http://books.perl.org/onlinebooks | http://perl-begin.berlios.de/tutorials/ | http://learn.perl.org/library/beginning_perl/
<19> runaway: Buy a book also.
<19> or three :)
<27> Anyone knows how to detect if an string is on UTF-8? Using Perl-5.8.7.
<28> danip: utf8::valid()
<28> danip: utf8; and Encode; have the rest of the bits that you're looking for.
<27> Right now Im using Encode::decode_utf8($string), but if $string is on latin1, it doenst work,
<27> should if be: if(utf8::valid($string)) {Encode::decode_utf8($string)} ??
<28> danip: you have to know what encoding the string has for starters.
<28> danip: you can guess, but there are some encodings which you can't distinguish between without external information.
<11> when you print << THEEND <-- what is that called?
<11> (how do i look it up in perldoc?)
<28> danip: if you know, then you use decode to turn the sequence of octets into perl's internal string representation.
<27> dondelelcaro: Mm.. Actually I dont have way to know the encoding, it can be in either latin1 or utf8
<28> danip: hrm... why not?
<28> danip: I suppose you could check if it is utf8, if it is use utf8, otherwise use latin-1
<27> dondelelcaro: Its data that comes from an external source from the network.
<28> but there are some valid latin-1 sequences that are also perfectly valid utf8.
<28> danip: what format?
<23> danip: if you haven't got a way to distinguish character encodings in a network protocol, it's a poorly-designed protocol
<28> almost any sane transmission format specifies the character encoding
<27> its just names and surnames that are results from ldap queries against an Active directory server
<28> doesn't the ldap server specify one encoding or the other?
<28> if it's that manic... egads
<27> Dunno.. some users got latin1 chars on it and others are on utf8. And I need to store them all on latin1.
<28> ugh. you should go the other direction
<27> wich one?
<28> all data in utf8
<27> Mm.. yep. But the problem is that I dont manage those ldap servers :( I dont even know who does.
<28> ugh. well, your choices are basically to guess... probably for most names it'll be valid latin-1 but not valid utf8; so if it's not valid utf8 you can ***ume latin-1
<27> Ive got here an string in latin1 (an e with tilde, thats.. 0xe9). and utf8::valid() returns true.. :?
<28> it'll be rare to have names like t or something else wierd which may also be valid utf8...


Name:

Comments:

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






Return to #perl
or
Go to some related logs:

#math
ubunto ntpd
linux 4318 support
truly_random_value
#web
#css
sh: -c: line 0: unexpected EOF while looking for matching `'' + centos
#web
FC5 ssh on
#lisp



Home  |  disclaimer  |  contact  |  submit quotes