@# 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



Comments:

<0> i've been trying to get and older bizmail script it to work with my new servers..it worked on the old ones.. but.. alas.. im ... stupid today or something
<1> is it possible to call qx without using the shell?
<2> Meriwether: since parrot is where we're supposed to end up, that's encouraging
<3> hi
<4> qx doesn't launch a shell unless there are weird cahars
<4> chars
<5> they never did make any promises on the release date for Perl6 though, right?
<3> i was curious if it is possible to use perl to read a file and output the file in binary form in another file
<6> rutski89: christmas.
<6> year unspecified.
<4> what does "binary form" mean?
<5> lol
<0> lol
<2> sarah: yes
<7> PerlJam: Everything I read suggests Perl 5 will one day, just BE Perl 6.
<2> Meriwether: perhaps.



<7> PerlJam: We'll wake up and say, "huh, we're using Perl 6!"
<6> or they'll wake up and use lisp
<3> i would like to read a file in and output the binary to another file ie 101101 form
<7> LISP is inappropriately named.
<7> It should be LITHP.
<3> perljam could you help me with that
<1> merlyn, this is what i'm running through qx: http://paste.flodhest.net/1152638017.html ...can you tell me what i'm doing wrong?
<2> sarah: I could but your problem is incompletely specified.
<3> im sorry how can i explain it better
<1> sarah, something like this:
<1> eval: sprintf "%b", 9
<8> janhaa: 1001
<1> ?
<2> Meriwether: perl5 has gotten "use feature qw/blah/" for gradually bringing in perl6isms. The only problem is that ponie (perl5 on parrot) seems to have stalled, so the perl5 and perl6 ends don't quite meet
<4> does rrdtool write to stdout?
<4> and why do you care about a shell?
<1> merlyn, yes
<4> then your qx should capture that
<0> Meriwether, that is true
<1> merlyn, it does capture that, but i don't want the "sh -c ...." if i don't have to. i thought i could call the app "directly", without using `sh`
<4> you have odd chars in there
<3> well just say i have a text file that contains the text "hello world" i would like to be able to ouput that text in binary to another file. so the second file would contain only 1's and 0's in text
<4> you can do the splitting yourself, and then a pipe open with explicit parameters
<2> sarah: see what janhaa said.
<4> open my $child, "-|", "your_cmmand", "arg1", "arg2", "arg3";
<4> that'll read the output of your command without ever using a shell
<4> my @results = <$child>;
<3> oh sorry i missed that line. thanks
<3> =) you guys are great
<4> what does "only 1's and 0's" mean
<1> merlyn, ok. so qx _does_ call the shell. thanks.
<4> it calls the shell when there are ugly chars
<4> my $now = `date`; # no /bin/sh
<4> my $now = `date | cat`; # /bin/sh called here
<1> merlyn, so where are my "ugly" chars?
<4> if it's just simple enough, perl does the processing directly
<4> you have : and quotes
<3> if 9 is 1001 in binary then i would read in a file that contains the char 9. and output the binary 1001 to a second file
<4> the quotes mean "give it to the shell to de-quote it"
<3> sorry i couldnt explain that easier
<1> ah. ok. thanks
<4> you actually want a string that has ascii "1" and ascii "0"
<4> or bit 1 and bit 0?
<4> or what?
<1> merlyn, any way i can "decode" it before sending it to qx(), or should i simply use open() instead?
<4> qx is pretty conservative
<4> pretty hard to get it to do what you want here.
<4> just use pipe-open
<1> ok.
<3> ascii containing 1 and 0
<1> eval: sprintf "%b", ord $_ for("helloworld"=~/(.)/g)
<8> janhaa:
<4> but janhaa - again, why do you care if there's a /bin/sh there?
<4> you get the same result either way
<1> :P
<4> eval:unpack "B*", "hello"
<8> merlyn: 0110100001100101011011000110110001101111
<4> that's what you want to use
<1> merlyn, i'm calling it many,many times pr second, so i thought it might be faster if i went directly to the "source" :)
<3> could i replace "hello" with an entire file
<4> with a string, yes



<4> read the file into a string
<4> why do you want so many 1's and 0's?
<4> you like everythign taking 8 times as much space?
<9> moooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo
<4> is this some form of obscuration?
<10> buubot: source
<8> Dist: svn co svn://erxz.com/eb
<3> no its just for me to prctice with differnt perl commands
<10> buubot: thanks
<8> Dist: thanks. Is the one in perl5/ orphaned?
<3> just playing around
<4> sarah - this smells like homework then
<3> yah it is
<4> F U
<4> dammit
<4> tricked up
<4> sarah BAD BAD BAD
<4> don't do that
<3> no its self-given homework
<4> I should have smelled it earlier
<3> not for school
<11> haha
<9> merlyn is bad
<3> seriously
<3> ahh well i can only promise i wouldnt cheat. you dont have to believe me though
<4> you should be asking YOUR INSTRUCTOR, not us
<4> and not LYING TO US
<12> can i compile perl code under windows in a dll?
<9> merlyn, you're such a senile hack
<4> that's f'ing rude, bad, and I hope I never have to replace your code with code that works
<13> how would i find if there exists a value that starts with a certain character inside an array?
<9> didn't you ever learn, IRC > (you instructor's entire knowledge * 100000)
<9> err, that's a typo
<9> it should read 1,000,000
<3> im not lying god
<14> kinections: probably with grep()
<3> thats ****ed up. i told you im working for myself
<9> sarah, what do you need to do?
<5> merlyn: Google Check out looks good :)
<5> merlyn: But I really have to be on the ball with Perl and XML to use the API
<13> pravus: thanks
<3> i told you im just playing around. like yesterday i wrote an algorithm for producing prime numbers, its just fun. learing perl
<5> any suggestions anyone? Should I just get the standard O'reilly books on the subject, or are their better ones?
<2> sarah: http://learn.perl.org/ has some nice resources for learning perl.
<5> on XML and Perl that is
<15> perlbot, learn perl?
<16> http://learn.perl.org/library/beginning_perl/
<3> i know i've used theres and have learning perl by oreilly
<3> but its hard to find a good book on perl file-operations
<2> rutski89: The O'Reilly books on perl a pretty much definitive. XML is another matter though
<9> moo
<9> perlbot be cabbage
<16> <cabbage> Hi, can I paste this very long script I downloaded and let you fix it for me plz??
<2> sarah: perldoc -f open
<8> sarah: Type 'perldoc -f open' in your shell or go to http://perldoc.perl.org/functions/open.html
<2> sarah: perldoc perlopentut
<8> sarah: Type 'perldoc perlopentut' in your shell or go to http://perldoc.perl.org/perlopentut.html
<2> sarah: perldoc -f readline
<8> sarah: Type 'perldoc -f readline' in your shell or go to http://perldoc.perl.org/functions/readline.html
<2> sarah: perldoc -f read
<8> sarah: Type 'perldoc -f read' in your shell or go to http://perldoc.perl.org/functions/read.html
<2> sarah: perldoc -f sysread
<8> sarah: Type 'perldoc -f sysread' in your shell or go to http://perldoc.perl.org/functions/sysread.html
<9> SPAM
<3> ok thanks
<9> PerlJam :)
<3> i am seriously very appreciative of the help.
<15> GumbyBRAIN: Could you please explain where this tomato came from?
<17> Please please please.
<5> PerlJam: These two require no previous experience with XML http://www.oreilly.com/catalog/pwebserperl/ http://www.oreilly.com/catalog/perlxml/ but should I also get a book only on XML to supplement, or do you think that those will provide enough information for me to be comfortable with XML as well?
<5> PerlJam: have you read them?


Name:

Comments:

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






Return to #perl
or
Go to some related logs:

solitaire lite
#asm
iptables conntrack pptp
#gaim
wilymage
nvidiafb grub
#suse
baruser
can't initialize audio ubuntu
#kernel



Home  |  disclaimer  |  contact  |  submit quotes