60 PerlMonks - Newest Nodes New nodes appearing on PerlMonks http://perlmonks.org/index.pl?node_id=30175 http://blogs.law.harvard.edu/tech/rss PerlMonks Newest Nodes XML Generator 961 PerlMonks 2014-09-20 11:49:27 rss,clean Sat Sep 20 01:49:27 2014 30 20140920014927 Sat Sep 20 01:49:27 2014 http://perlmonks.org/ Anonymous Monk array search on mysql result rups http://perlmonks.org/index.pl?node_id=1101361 I have a database which contains mobile numbers. How do I write perl script which get all of numbers into array & check new number already exist or not in that array? Create Table:*... perlquestion Sat, 20 Sep 2014 10:07:54 +0000 http://perlmonks.org/index.pl?node_id=1101361 1101361 1101359 2014-09-20 06:07:54 rups call_pv on CORE:: sub from XS OlegG http://perlmonks.org/index.pl?node_id=1101336 I am trying to do this call_pv("CORE::socketpair", G_SCALAR); And this works excellent on perl 5.20, but fails on perl 5.14 with message "Undefined subroutine &CORE::socketpai... perlquestion Sat, 20 Sep 2014 06:36:26 +0000 http://perlmonks.org/index.pl?node_id=1101336 1101336 881330 2014-09-20 02:36:26 OlegG Reaped: China nba jerseys outlet NodeReaper http://perlmonks.org/index.pl?node_id=1101348 This node was taken out by the <a href="?node=NodeReaper">NodeReaper</a> on Sep 20, 2014 at 08:14&nbsp;UTCReason: &#91;<a href="?node=erix">erix</a>&#93;: reapYou may view &#91;href://?node=Visit%20Reaped%20Nodes&nodenum=1101348|the original node an... perlmeditation Sat, 20 Sep 2014 07:54:35 +0000 http://perlmonks.org/index.pl?node_id=1101348 1101348 52855 2014-09-20 03:54:35 NodeReaper Re^3: read CSV file line by line and create hash table james28909 http://perlmonks.org/index.pl?node_id=1101372 you know what lol, i dont even care anymore. it is merely your opinion to think the post i made deserves a downvote, unless you can give me actual physical proof as to why you downvote me, i could car... note Sat, 20 Sep 2014 11:45:24 +0000 http://perlmonks.org/index.pl?node_id=1101372 1101372 1018106 2014-09-20 07:45:24 james28909 Re^3: How to convert negative and positive floating points to binary and vice versa BrowserUk http://perlmonks.org/index.pl?node_id=1101371 I would like to have an 8 bit negative/positive floating point. You want an 8-bit floating point value. Why? A floating point value consists of 3 parts: ... note Sat, 20 Sep 2014 11:42:43 +0000 http://perlmonks.org/index.pl?node_id=1101371 1101371 171588 2014-09-20 07:42:43 BrowserUk Re^2: read CSV file line by line and create hash table james28909 http://perlmonks.org/index.pl?node_id=1101370 what was i downvoted for? it really disheartens me to get downvoted for just trying to help someone. and also nto to even get any feedback at all as to why i got the downvote :l i know i offe... note Sat, 20 Sep 2014 11:29:35 +0000 http://perlmonks.org/index.pl?node_id=1101370 1101370 1018106 2014-09-20 07:29:35 james28909 Re^3: How to convert negative and positive floating points to binary and vice versa AnomalousMonk http://perlmonks.org/index.pl?node_id=1101369 An eight-bit floating point representation would seem to offer an extremely limited dynamic range, but whatever floats your boat... According to the WP article referenced above, IEEE-754 already ... note Sat, 20 Sep 2014 11:23:12 +0000 http://perlmonks.org/index.pl?node_id=1101369 1101369 634253 2014-09-20 07:23:12 AnomalousMonk Re^3: How to convert negative and positive floating points to binary and vice versa Anonymous Monk http://perlmonks.org/index.pl?node_id=1101368 So you want a floating-point number packed into 8 bits? Why? I'm not sure if there is a standardized format for those, since they're not all too useful, I've only found them referenced in t... note Sat, 20 Sep 2014 11:16:59 +0000 http://perlmonks.org/index.pl?node_id=1101368 1101368 961 2014-09-20 07:16:59 Anonymous Monk Re: array search on mysql result choroba http://perlmonks.org/index.pl?node_id=1101367 Crossposted at <a href="http://stackoverflow.com/q/25947463/1030675">StackOverflow</a>. It's considered polite to inform about crossposting, so people not attending both sites don't waste their efforts hacking a ... note Sat, 20 Sep 2014 10:58:00 +0000 http://perlmonks.org/index.pl?node_id=1101367 1101367 832495 2014-09-20 06:58:00 choroba Re^2: How to convert negative and positive floating points to binary and vice versa thanos1983 http://perlmonks.org/index.pl?node_id=1101366 Hello AnomalousMonk, Thank you for your time and effort, it start to makes sense what you said. The only problem is that I would like to have an 8 bit negative/positive floating point.... note Sat, 20 Sep 2014 10:51:15 +0000 http://perlmonks.org/index.pl?node_id=1101366 1101366 1069339 2014-09-20 06:51:15 thanos1983 Re: array search on mysql result LanX http://perlmonks.org/index.pl?node_id=1101364 &gt; check new number already exist or not why can't you use a <a href="https://duckduckgo.com/html/?q=WHERE-clause%20in%20SQL">WHERE-clause in SQL</a>? Seems off topic here... Cheers ... note Sat, 20 Sep 2014 10:40:47 +0000 http://perlmonks.org/index.pl?node_id=1101364 1101364 708738 2014-09-20 06:40:47 LanX Re^2: Tabs using HTML::Template (tab navigation, ie html) Anonymous Monk http://perlmonks.org/index.pl?node_id=1101363 Could you show some code sample? Thank you!... note Sat, 20 Sep 2014 10:36:21 +0000 http://perlmonks.org/index.pl?node_id=1101363 1101363 961 2014-09-20 06:36:21 Anonymous Monk Re^2: read CSV file line by line and create hash table james28909 http://perlmonks.org/index.pl?node_id=1101362 check this out, works great if yoru extracting files referenced by the header ;) my $fileLocation = ''; my $fileSize = ''; my $fileName = ''; my $chunk =... note Sat, 20 Sep 2014 10:08:56 +0000 http://perlmonks.org/index.pl?node_id=1101362 1101362 1018106 2014-09-20 06:08:56 james28909 Re^5: call_pv on CORE:: sub from XS Anonymous Monk http://perlmonks.org/index.pl?node_id=1101358 My suggestion is to do it in perl code cause xs code is ucky :)... note Sat, 20 Sep 2014 09:35:49 +0000 http://perlmonks.org/index.pl?node_id=1101358 1101358 961 2014-09-20 05:35:49 Anonymous Monk Re^3: Stuttering Children dave_the_m http://perlmonks.org/index.pl?node_id=1101357 Well you could completely avoid the issue by reading all of __DATA__ into a var before forking (assuming its a DATA issue)... note Sat, 20 Sep 2014 09:28:10 +0000 http://perlmonks.org/index.pl?node_id=1101357 1101357 341121 2014-09-20 05:28:10 dave_the_m Re^4: call_pv on CORE:: sub from XS OlegG http://perlmonks.org/index.pl?node_id=1101356 Ok, then just calling socketpair() looks good for me. One problem is that after this my XS function should return perl handle to the user, so he can call syswrite() on it. What I can't understand... note Sat, 20 Sep 2014 09:27:23 +0000 http://perlmonks.org/index.pl?node_id=1101356 1101356 881330 2014-09-20 05:27:23 OlegG Re^7: flip flop operator and if statement LanX http://perlmonks.org/index.pl?node_id=1101353 In this code you are obviously always assigning 3. What's the problem? Cheers Rolf (addicted to the Perl Programming Language ... note Sat, 20 Sep 2014 08:11:50 +0000 http://perlmonks.org/index.pl?node_id=1101353 1101353 708738 2014-09-20 04:11:50 LanX Re^5: flip flop operator and if statement Athanasius http://perlmonks.org/index.pl?node_id=1101352 Yes, if $p were being assigned the return value of the flip-flop operator, as in the OP, then it would indeed be incremented by one on each iteration in which the flip-flop operator evaluate... note Sat, 20 Sep 2014 08:07:42 +0000 http://perlmonks.org/index.pl?node_id=1101352 1101352 968231 2014-09-20 04:07:42 Athanasius Re^6: flip flop operator and if statement iThunder http://perlmonks.org/index.pl?node_id=1101350 it prints 3 for every iteration i.e. #!/usr/bin/perl ##use warnings; while(){ if(($p=3)..5) { print "p is $p\n"; } } p is 3 p is 3 p is 3... note Sat, 20 Sep 2014 08:07:19 +0000 http://perlmonks.org/index.pl?node_id=1101350 1101350 1058717 2014-09-20 04:07:19 iThunder Re^5: flip flop operator and if statement LanX http://perlmonks.org/index.pl?node_id=1101349 &gt; shouldnt the value of p in every iteration increment by one? In your OP you already showed that it does. Cheers Rolf ... note Sat, 20 Sep 2014 08:01:58 +0000 http://perlmonks.org/index.pl?node_id=1101349 1101349 708738 2014-09-20 04:01:58 LanX Re^2: read CSV file line by line and create hash table james28909 http://perlmonks.org/index.pl?node_id=1101347 it also looks as if your working with a file 16 mb in size. could you upload one of your files and let me take a look? :)... note Sat, 20 Sep 2014 07:47:09 +0000 http://perlmonks.org/index.pl?node_id=1101347 1101347 1018106 2014-09-20 03:47:09 james28909 Re^4: flip flop operator and if statement iThunder http://perlmonks.org/index.pl?node_id=1101346 but then what should be the value of $p. " Perl, as a convenience, returns “true” in the form of a sequence number." shouldnt the value of p in every iteration increment by one?... note Sat, 20 Sep 2014 07:32:29 +0000 http://perlmonks.org/index.pl?node_id=1101346 1101346 1058717 2014-09-20 03:32:29 iThunder Re^3: call_pv on CORE:: sub from XS Anonymous Monk http://perlmonks.org/index.pl?node_id=1101345 Yes, also tried this. No success: "Undefined subroutine &main::socketpair called" Well then, something you're leaving out :) As &#91;href://http://perl5.git.perl.org/perl.git/blob/a3... note Sat, 20 Sep 2014 07:19:58 +0000 http://perlmonks.org/index.pl?node_id=1101345 1101345 961 2014-09-20 03:19:58 Anonymous Monk Re^2: call_pv on CORE:: sub from XS OlegG http://perlmonks.org/index.pl?node_id=1101344 Yes, also tried this. No success: "Undefined subroutine &main::socketpair called" ... note Sat, 20 Sep 2014 07:12:16 +0000 http://perlmonks.org/index.pl?node_id=1101344 1101344 881330 2014-09-20 03:12:16 OlegG Re^3: Passing arguments to event handlers in WxPerl (is something you never have to do; wx-combobox-event.pl) Anonymous Monk http://perlmonks.org/index.pl?node_id=1101343 Put it in a subroutine , call subroutine and give it args, have subruotine return values, subroutines are easy to call repeatedly , programming is all about well named suboutines calling each other ..... note Sat, 20 Sep 2014 07:10:06 +0000 http://perlmonks.org/index.pl?node_id=1101343 1101343 961 2014-09-20 03:10:06 Anonymous Monk Re^3: Search a SQL Table and Delete Records Katanya http://perlmonks.org/index.pl?node_id=1101342 I am sorry it has taken me so long to get back here to reply, but I was working my way up to finals for this college quarter and had to put this on the back burner for a while. poj, your co... note Sat, 20 Sep 2014 07:06:43 +0000 http://perlmonks.org/index.pl?node_id=1101342 1101342 1098927 2014-09-20 03:06:43 Katanya Re^3: flip flop operator and if statement Athanasius http://perlmonks.org/index.pl?node_id=1101341 Hello again <a href="?node=iThunder">iThunder</a>, if(($p=3)..5) This assigns 3 (which is non-zero and therefore true) to $p on each loop iteration. So the left-... note Sat, 20 Sep 2014 06:54:21 +0000 http://perlmonks.org/index.pl?node_id=1101341 1101341 968231 2014-09-20 02:54:21 Athanasius Re: call_pv on CORE:: sub from XS Anonymous Monk http://perlmonks.org/index.pl?node_id=1101340 Try "socketpair" ... note Sat, 20 Sep 2014 06:54:21 +0000 http://perlmonks.org/index.pl?node_id=1101340 1101340 961 2014-09-20 02:54:21 Anonymous Monk Re^4: Faster indexing an array wollmers http://perlmonks.org/index.pl?node_id=1101339 It's not my code, it's from Algorithm::Diff. Of course, A::Diff could be faster, maybe I take over the module.... note Sat, 20 Sep 2014 06:54:13 +0000 http://perlmonks.org/index.pl?node_id=1101339 1101339 1060595 2014-09-20 02:54:13 wollmers Re: School assignment ( File::Finder ) Anonymous Monk http://perlmonks.org/index.pl?node_id=1101338 I need to write a perl script that searches for a file from standard input and then opens the file along with line numbers to the left of every line.. Been sitting for hours but haven't got it ... note Sat, 20 Sep 2014 06:47:38 +0000 http://perlmonks.org/index.pl?node_id=1101338 1101338 961 2014-09-20 02:47:38 Anonymous Monk Re: Tabs using HTML::Template (tab navigation, ie html) Anonymous Monk http://perlmonks.org/index.pl?node_id=1101337 Hi Monks! I am curious to know if anyone here has made a tab navigation using HTML::Template. Thanks in advance! Sure, I have... note Sat, 20 Sep 2014 06:37:40 +0000 http://perlmonks.org/index.pl?node_id=1101337 1101337 961 2014-09-20 02:37:40 Anonymous Monk Re^3: flip flop operator and if statement Anonymous Monk http://perlmonks.org/index.pl?node_id=1101335 What about them? Avoid it also?... note Sat, 20 Sep 2014 06:26:10 +0000 http://perlmonks.org/index.pl?node_id=1101335 1101335 961 2014-09-20 02:26:10 Anonymous Monk Re^2: flip flop operator and if statement iThunder http://perlmonks.org/index.pl?node_id=1101334 Hi Athanasius, Thanks for quick response. What about if the if statement is like . if(($p=3)..5) . if (($c=1 and $p=3)..5)... note Sat, 20 Sep 2014 06:23:23 +0000 http://perlmonks.org/index.pl?node_id=1101334 1101334 1058717 2014-09-20 02:23:23 iThunder rups rups http://perlmonks.org/index.pl?node_id=1101359 user Sat, 20 Sep 2014 10:02:11 +0000 http://perlmonks.org/index.pl?node_id=1101359 1101359 1101359 2014-09-20 06:02:11 rups abhishek mishra abhishek mishra http://perlmonks.org/index.pl?node_id=1101354 user Sat, 20 Sep 2014 08:38:17 +0000 http://perlmonks.org/index.pl?node_id=1101354 1101354 1101354 2014-09-20 04:38:17 abhishek mishra