COMPGROUPS.NET | Post Question | About | Groups | Contact | Register | Login



comp soft-sys matlab (18489)

comp os linux advocacy (5155)

comp soft-sys sas (3803)

comp soft-sys math mathematica (2916)

comp lang python (2903)

comp lang ruby (2550)

comp text tex (1729)

comp sys mac advocacy (1658)

comp lang c++ (1415)

comp lang javascript (1219)

comp lang c (1196)

comp lang perl misc (1191)

comp lang java programmer (925)

comp dsp (908)

comp sys mac system (890)

comp lang tcl (872)

comp databases ms-access (760)

comp arch fpga (749)

comp lang idl-pvwave (726)

comp software shareware announce (702)

comp lang php (697)

comp lang lisp (682)

comp sys sun announce (659)

comp arch embedded (626)

comp sys mac apps (609)

comp sys ibm ps2 hardware (545)

comp lang c++ moderated (524)

comp lang fortran (524)

comp unix shell (521)

comp os plan9 (514)

comp os linux misc (513)

comp unix solaris (500)

comp databases oracle server (494)

comp sys ibm pc games war-historical (485)

comp lang python announce (483)

comp os ms-windows programmer win32 (476)

comp databases mysql (412)

comp sys cbm (408)

comp dcom sys cisco (407)

comp arch (306)

comp sys ibm pc games action (301)

comp databases informix (274)

comp lang clipper visual-objects (267)

comp os vms (263)

comp lang perl announce (238)

comp lang xharbour (229)

comp graphics apps gnuplot (224)

comp realtime (216)

comp soft-sys ace (215)

comp lang ada (213)

comp protocols nfs (207)

comp protocols snmp (204)

comp parallel (202)

comp sys acorn announce (196)

comp protocols tcp-ip domains (193)

comp sys ibm pc hardware systems (191)

comp unix internals (187)

comp infosystems www browsers misc (184)

comp misc (182)

comp publish cdrom software (182)

comp dcom cabling (174)

comp mail mime (169)

comp std announce (169)

comp ai fuzzy (168)

comp ai edu (166)

comp soft-sys stat spss (156)

comp protocols kerberos (155)

comp databases filemaker (155)

comp sys apple2 (153)

comp admin policy (151)

comp databases postgresql committers (150)

comp databases ibm-db2 (149)

comp databases ms-sqlserver (131)

comp protocols dicom (129)

comp unix programmer (128)

comp security misc (123)

comp unix bsd freebsd misc (120)

comp graphics visualization (117)

comp cad cadence (117)

comp databases olap (116)

comp apps spreadsheets (114)

comp databases postgresql general (114)

comp lang vhdl (113)

comp lang java help (113)

comp ai neural-nets (112)

comp ai (111)

comp ai games (110)

comp dcom telecom (109)

comp client-server (108)

comp os linux announce (105)

comp cad microstation (105)

comp databases oracle marketplace (105)

comp soft-sys math scilab (102)

comp databases progress (102)

comp os linux networking (101)

comp database oracle (100)

comp graphics api opengl (99)

comp ai genetic (98)

comp protocols dns bind (97)

comp compilers (97)


comp.lang.perl.misc Post New
Items(965) /20 Next >> Last >|
Subject Posted Replies From
XML Xpath interrogation

I have this XML data: <doc> <title>Aaa</title> <para>Ppp</para> <section type="baz"> <title>Xxx</title> <para>Qqq</para> <section> <title>Mmm</title> </section> <title>Yyy</title> <para>Rrr</para> </section> </doc> Notice that 'doc/section' has two 'title' children. I need to split 'doc/section' in two: <doc> <title>Aaa</title> <para>Ppp</para> <section type="baz"> <title>Xxx</title> <para>Qqq</para> <section> <title>Mmm</title> </section> </section><!-- Insert this --> <section type="baz"><!-- And this --> <title>Yyy</title

9/7/2010 6:28:38 PM 0 Larry Sulky <larrysu...@gmail.com>
slices

How do I pass just a "slice to mysubsub()? I have an array reference to three hashes $p = [ {a => "1"}, {b => "2"}, {c => "4} ]; mysub($p); sub mysub { my ($pF) = @_; #every thing ok so far mysubsub($pF); #passes all three # want something like this, but can't seem to make it work. mysubsub(@{$pF->[1..2]}) Thank you.

9/7/2010 1:37:11 PM 3 okey <oldyor...@yahoo.com>
POSIX and Math::Trig

Is there a simple way to use both POSIX and Math::Trig without getting a flurry of warnings ? Subroutine main::atan redefined at myscript line 24 Subroutine main::asin redefined at myscript line 24 Subroutine main::tanh redefined at myscript line 24 Subroutine main::cosh redefined at myscript line 24 Subroutine main::tan redefined at myscript line 24 Subroutine main::acos redefined at myscript line 24 Subroutine main::sinh redefined at myscript line 24 Thanks in advance. -- Andr� Majorel http://www.teaser.fr/~amajorel/ "This album is very well mixed, so it is difficult to te

9/6/2010 11:15:57 AM 14 Andre Majorel <che...@halliburton.com>
Minimizing DOS attacks (and other security issues)

I have implemented a means to deal with Denial Of Service attacks where a CGI script might be invoked 10,000 times per second in an attempt to keep the server busy and cause flooding of emails. Here is the code I used: my $lockfile = "lock.txt"; if (not(-e $lockfile)){ #check for exist open (fLock, '>', $lockfile) or HTMLdie ("File error: $!"); close fLock; sleep(10); unlink ($lockfile); } else {HTMLdie ("Please try again later", "Event Processor Busy");} I have tested it by opening the following link in two browser windows and sending the reques

9/5/2010 9:04:27 AM 0 "Paul E. Schoen" <p...@pstech-inc.com>
Capture http address of a link in perl

Hello All, I am using win32::IEAutomation and trying to automate a website. In the http page, there is a table with lot of rows having links as well as text. I am looking for rows, say @rows that have a particular string, say $string. I want to navigate to links that are present in @rows. A small example of what I am trying to do: some_text (link) $string some_text (link) $other_string some_text (link) $other_string some_text (link) $other_string some_text (link) $string The address of the link is embedded inside the html page. I want to nav

9/2/2010 11:46:24 PM 1 shankar_perl_rookie <mulshan...@gmail.com>
Is /proc there (from Perl on BSD)

How to check that /proc is working on BSD? And check it from Perl? On Linux and Solaris, -d "/proc/$$" is TRUE. Apparently (by indirect guesses from output on CPANtesters), this does not work on 3 BSD test machines (Open-, Free- and Net-). Neither does perl -wle 'open PR, qq(/proc/$$/cmdline) or die $!' on the only BSD machine I can login into (FreeBSD 7.3). According to WikiPedia, /proc should be available. According to FreeBSD manpages, the file /proc/$$/cmdline should be available. How should I interpret this? Is /proc "very optional", and disabled by default?

9/1/2010 6:34:18 AM 3 Ilya Zakharevich <nospam-ab...@ilyaz.org>
[CGI] How to set a 404 error?

In a perl CGI script, is it possible to throw a 404 error? If so, how is it done? Thanks in advance, Rui Maciel

8/30/2010 9:21:21 PM 9 Rui Maciel <rui.mac...@gmail.com>
ActiveState Perl 5.10 on Windows XP - can't shell!!??

Searched high and low on this and have found absolutely nothing. It's so bizarre. I've never actually heard of this happening anyway. (It's Windows, so there's half of the problem there, IMO...) Running ActiveState Perl v5.10 on Windows XP. All of a sudden, for seemingly no reason at all (of course none that I know about), I can't shell out of Perl. For instance: C:\> perl -e "$dir = `dir`; print $dir;" Prints nothing. The `dir` doesn't happen. I've tried using qx{} as well. I have Cygwin running on my machine and it works fine using Cygwin Perl v5.10. But not under Acti

8/30/2010 7:32:05 PM 6 Perl Junkie <perljun...@gmail.com>
Energy Saving Tips

1. Reduce heater's room temperature For each extra degree (Celsius) of temperature, your heater will consume 7 to 11% more energy. Adjust it to 18degrees which is also better for your health. 2. Install a programmable thermostat You will be able to control the heater's temperature during specific hours every day. 3. Insulate your house Loss of heat is loss of energy. 4. Fix air leaks 5. Close the chimney of the fireplace when you don't use it It is designed to drive smoke (hot air) out of the house! 6. Get an energy audit to advice you about the necessary fixes and insulation 7.

8/30/2010 4:32:18 PM 0 ".." <sustainable.future...@gmail.com>
perfmon and perl

Hi All, I am using use Win32::PerfMon; in a 64 bit windows 7 system. Is htis module only for 32 bit if so..where can I get a module for 64 bit os. The module got installed but when running the programme, its showing the below error. I didn't write any code but just trying to use the module and see how it works so that I can use it. " Can't locate loadable object for module Win32::PerfMon in @INC (@INC contains: C :/Perl64/site/lib C:/Perl64/lib .) at perfmon-cstate.txt line 1 Compilation failed in require at perfmon-cstate.txt line 1. BEGIN failed--compilation aborted at perfmon-cs

8/30/2010 4:20:46 AM 3 king <hara.acha...@gmail.com>
How to suppress methodName element in soap:Body of envelope with SOAP::Lite

Hi, Is there a way to suppress the surrounding methodName element of the soap:Body section of the SOAP envelope? The web service sends a fault back saying there is an unknown part (the methodName element) in the request. This web service is implemented as a doc/literal type if that makes a difference. I looked at SOAP::Serializer but it wasn't clear to me how to apply that to the SOAP object being sent with the methodName call. It doesn't make any difference if I use the wsdl method or the lower level uri/proxy method. #/usr/bin/per use strict; use warnings; use SOAP::L

8/29/2010 5:06:21 PM 2 droesler <droes...@comcast.net>
Simple hack to get $5000 to your *Paypal account

Simple hack to get $5000 to your *Paypal account At http://youcanget.co.cc i have hidden the Paypal Form link in an image. in that website on Right Side below search box, click on image and enter your name and Paypal ID.

8/28/2010 11:29:10 AM 0 paypal cash <m.bangara...@gmail.com>
require hangs

I have a few dependant modules, too extensive to post at this point. A general question, what could make a 'require' of a module hang, when a 'use' works? I could try to boil it down to something more specific, but the mystery lies within several thousand lines of code. Any suggestions are appreciated. Thanks.

8/27/2010 3:47:37 AM 2 monkeys paw <mon...@joemoney.net>
* Simple hack to get $5000 to your Paypal account

* Simple hack to get $5000 to your Paypal account At http://moneyforwarding.co.cc i have hidden the Paypal Form link in an image. in that website on Right Side below search box, click on image and enter your name and Paypal ID.

8/26/2010 4:41:20 PM 0 Brazil Acctressess <paidi.shivakris...@gmail.com>
Help writing 'simple' loop

$h1_right through $h10_right are 10 independent integer values. $hTotalRight = $h1_right + $h2_right + $h3_right + $h4_right + $h5_right + $h6_right + $h7_right + $h8_right + $h9_right + $h10_right; I can't figure out the syntax for $XXX to write a loop to do the addition. $hTotalRight = 0; for ($i=1;$i<11;$i++) { $hTotalRight = $hTotalRight + $XXX; } What is the syntax for $XXX? TIA, Joey

8/26/2010 3:45:44 PM 48 JoeyF1...@earthlink.net
report graphing

I am not sure where else to post this but I am running a LAMP environment and my users now want historical graphical reporting. For instance, normally the user would have a web interface and submit a bunch of parameters to it and I would spit back a report. But now they want this report to be graphical and they want it to keep historical information of their parameters. So for instance at 9am they want to see how many hits a site got (assume for example purposes we store in the DB). Then at 9:10, the report is refreshed and they see how many hits we have gotten since 9am, then 9:20, et

8/26/2010 1:35:11 PM 4 androidUser78 <jtbutler1...@gmail.com>
perl split

This I understand, $ perl -le '@a=split//,"abc"; print $#a; print for(@a)' 2 a b c But why this behavior? $ perl -le '@a=split/(.)/,"abc"; print $#a; print for(@a)' 5 a b c TIA -James

8/25/2010 5:56:19 PM 3 James <hslee...@yahoo.com>
Odd file test behaviour on 64 bit windows

I'm assuming this is some magic I've not seen before, but I don't know if it's perl or windows which is messing this up. All I'm trying to do is to test for the existance of a directory in c:/ Program Files/ however the standard perl file tests seem to succeed if a directory is present in either c:/Program Files or c:/Program Files (x86). M:\>dir "c:\Program Files" Volume in drive C has no label. Volume Serial Number is 862E-DA6A Directory of c:\Program Files 25/08/2010 09:58 <DIR> . 25/08/2010 09:58 <DIR> .. 07/06/2010 12:21 <DIR>

8/25/2010 9:21:33 AM 9 Simon Andrews <simon.andr...@bbsrc.ac.uk>
split on a string that should be interpreted as a regex

Hello everybody, I need the wisdom of the perl community. I have a perl program that uses the split function as follows: my ($tag, $value) = split(":\s*", $_, 2); I want to split on ':', followed by optional whitespaces. When I run the program, I get a warning Unrecognized escape \s passed through at test.pl line 228. and the split is performed on the string ":\s", and NOT on the regular expression /:\s+/. I was thinking that perl (at least perl 5.8) interprets the first parameter of the split function always as a regular expression, even if it is a simple string, i.

8/24/2010 1:05:04 PM 10 Klaus <klau...@gmail.com>
Where is true and false value documented?

Hi, I know that true and false values has been discussed here and in page 30 of Programming Perl (3rd edition). But could anyone let me know where it is documented in command line perl document? http://www.perlmonks.org/?node_id=862 Regards, Peng

8/23/2010 7:05:11 PM 0 Peng Yu <pengyu....@gmail.com>
Regex: deleting non-matching words

I have input strings where some words start with an underscore. The plan is to remove all words that do NOT strt with an underscore and simply keep the rest. So for example starting with "word1 word2 _word3 word4 word5 _word6 _word7 word8" I'm trying to end up with "_word3 _word6 _word7" The expression I have got so far is s/.*?(_[a-z0-9]+).*?/ $1/gi; and my understanding is as follows: The first ".*?" part removes everything up to the first matching RE The "(_[a-z0-9]+)" matches any letter/number combination that starts with an underscore [sidenote: yes, I know: \w+] The final

8/22/2010 9:06:00 PM 4 pete <no_one_you_k...@notthisaddress.com>
I HACK $3500 FROM PAYPAL...

I HACK $3500 FROM PAYPAL At http://quickpaypalmoney.tk i have hidden the PAYPAL FORM link in an image. in that website on Right Side below search box, click on image and enter your name and PAYPAL ID.

8/21/2010 5:19:40 PM 2 Hot Hot Hot <m.appalako...@gmail.com>
Fast iterative reads

Hypothetically speaking: - Say I have a file containing 100,000 numbers, and each number corresponds to a database id and I have another file which contains all of the database ids plus the name of the file that corresponds to it. (Why couldn't I do an sql query which puts all the info in one file? Because I don't have access to the database!) So, I have these two files! (The second file is much larger than the first, say 300,000 records or more) Now, the only way that I can match database ids to filenames is to traverse list one and for each entry in list one then iterativel

8/20/2010 8:16:47 PM 9 Paul Branon <paulbra...@googlemail.com>
Perldoc: integers *stored* as... ???

In the online Perl 5 version 12.1 documentation at: http://perldoc.perl.org/perlnumber.html#Storing-numbers Under the heading of Storing Numbers it reads "In fact numbers stored in the native integer format may be stored either in the signed native form, or in the unsigned native form." Integers are *stored* as bits in a word, dword, or qword, it's how they're interpreted that matters. #!/usr/bin/perl use strict; use warnings; my $x = 0xffff_ffff; print $x, "\n"; printf("%d\n", $x); On a 32-bit machine outputs: 4294967295 -1

8/20/2010 4:07:26 PM 1 Sal <h...@softcom.net>
Multiple regex operations

Is there a way to apple multiple regex operations to a single string without writing them all out? example. suppose I have some variable $var and want it apple three regexs to it. is there a faster way than $var =~ s/foo/bar/; $var =~ s/foo/bar/; $var =~ s/foo/bar/;

8/20/2010 4:40:34 AM 5 =?ISO-8859-1?Q?Orion_M=EDmamei=F0r?= <zacharyellio...@gmail.com>
parsing CSV files

FILE contains: US,S,2009,Alexander L,R,"AGRICULTURE, NUTRITION AND FORESTRY." US,S,2009,Alexander L,R,ARMED SERVICES. If i parse the above lines with a split /,/ i will correctly get field[5] = "ARMED SERVICES" on line 2, but incorrectly field[5] = "AGRICULTURE," on line 1. while ($line = <IN>) { @field = split /,/, $line; print "$field[5]\n"; } Is there a way to modify the split to handle this file format?

8/19/2010 11:34:55 PM 5 monkeys paw <mon...@joemoney.net>
Perl array bug?

I believe I may have found a bug in ActivePerl 5.12.1.1201 (64-bit). This problem does *not* arise with ActivePerl 5.10.1.1007 (64-bit). Both running on Windows 7 64-bit with all current hot fixes. Unfortunately, I have not yet been able to isolate the problem code from a large and proprietary program. Howeber, in short, we clear a large array: @Big1 = (); The specific elements of the array are populated: $Big1[$index] = $value; However, the array contains many "holes" (undefined elements). So, this amounts to something like: $Big1[538] = 0; $Big1[53487] = 1; $

8/19/2010 6:08:04 PM 35 ma...@malch.com (Malcolm Hoar)
ActivePerl Migration Win 2003 Server to Win 2008 Server

Hello, I hope this post is not OT in c.l.p.m. I have got a couple of medium-sized (1000+ lines of code) of Perl programs (64 bits) running on Windows Server 2003, the perl version is: C:\>perl -v This is perl, v5.10.1 built for MSWin32-x64-multi-thread (with 2 registered patches, see perl -V for more detail) Binary build 1007 [291969] provided by ActiveState http://www.ActiveState.com Built Jan 27 2010 14:12:21 I am using ADODB to connect to MSAccess databases, I read ActiveDirectory entries and I use StorageCentral to setup Storage quotas for 1000+ directories. Now I ha

8/19/2010 11:01:13 AM 19 Klaus <klau...@gmail.com>
Warning message: Can't spawn ... No error

I have the following perl program to test return codes (I am running Strawberry Perl 5.12 under Windows Vista 64 bits): =============== use 5.012; use warnings; say 'Start'; system qq{perl -e"exit -1"}; say 'Stop'; =============== Here is the output: =============== Start Can't spawn "perl -e"exit -1"": No error at C:\test.pl line 5. Stop =============== The program as such runs ok, but the problem is the warning message >>Can't spawn "perl -e"exit -1"": No error<< which I don't understand at all. I want to have warnings on in general, but this particular warning is n

8/17/2010 5:39:18 PM 1 Dilbert <dilbert1...@gmail.com>
combining hashes

I have two hashrefs, i want to combine them into one hash. I think there is an easier way than what i am doing (shown below): $fc = {'a' => 'hash'}; $ref = {'another' => 'hash'}; for (keys %{$fc}) { $args{$_} = $fc->{$_}; } for (keys %{$ref}) { $args{$_} = $ref->{$_}; }

8/16/2010 7:53:59 PM 57 monkeys paw <mon...@joemoney.net>
Recursion regular expression (xtended)

Original message replied to was posted to perl.beginners 8-14, but it didn't show up. EasyNews is acting weird. To test, I'm posting it here... -sln On Fri, 13 Aug 2010 13:47:41 -0700 (PDT), tobias.wagener@googlemail.com (irata) wrote: >Hi... > >I want to replace in a javscript structure like the one below every >occurence of "{#...}", "{?...}", "{+...}" and "{=...}" through >something different (also nested): > function() { > test1 = "{#Caption}"; > test2 = "{#Te{?st}}"; > test3 = "{+date.{0}}"; > } > >with this regular expression > my( $open ) =

8/16/2010 2:38:30 PM 1 ...@netherlands.com
Consistent ps/top output format

Hello, I have written a Perl script to store and interpret the output of the unix 'ps'-command. It works well on my machine (FreeBSD 6.2.), but it doesn't work on a few other unix variants that I tested. I came to the conclusion that the output format is the culprit. This appears to differ across ps/top variants on several OS-es, even with the command line options mentioned in the docs. Is there any way to get the output of "ps" (or "top -b") into a reliable consistent format ? Thanks, -- Bart

8/16/2010 8:39:21 AM 2 Bart Van der Donck <b...@nijlen.com>
Can't print entire line.

Hi, Underneath __DATA__ is a snippet of a file. I can't print the entire line, only the first word. You will see '^M', when the file was produced it appended those '^M'. What am I doing wrong: #!/usr/bin/perl -w use strict; my @tmsh_show = <DATA>; while (my $line = <@tmsh_show>) { chomp($line); print "$line\n"; } __DATA__ --------------------------------------^M Status ^M Availability : available^M State : enabled^M Reason : The pool is available^M ^M Traffic ServerSide^M Bits In

8/15/2010 2:02:27 AM 6 Nene <rodbas...@gmail.com>
code snippet to convolve 2 vectors

I'm looking for perl code examples to get the convoltion of 2 arrays eg. like this : [1, 2] x [3, 4] = [ 3, 10, 8] -- MfG/Sincerely Toralf Förster pgp finger print: 7B1A 07F4 EC82 0F90 D4C2 8936 872A E508 7DB6 9DA3

8/14/2010 1:52:52 PM 4 Toralf =?UTF-8?B?RsO2cnN0ZXI=?= <toralf.foers...@gmx.de>
"Bizarre copy of HASH in sassign..." bug

Everyone once in a while, my code produces an error message that looks like this: Bizarre copy of HASH in sassign at /usr/share/perl/5.10/Carp/Heavy.pm line 96 I think it's an internal bug somewhere, and I can usually find a way around it, but still, it's puzzling. The latest manifestation of this problem occurred while I was writing unit tests for a module. My test script uses Test::More::throws_ok to check some error conditions. When checking this one error condition, it generates the message copied above. But if instead of writing my test like this: throws_ok { sh

8/11/2010 9:59:25 PM 2 kj <no.em...@please.post>
s/// returns the empty string, but not ""

I don't think this is returning the empty string ("") actually: $ man perlop s/PATTERN/REPLACEMENT/msixpogce Searches a string for a pattern, and if found, replaces that pattern with the replacement text and returns the number of substitutions made. Otherwise it returns false (specifically, the empty string). $ echo iiii|perl -nwle 'print 1 + s/i//g' 5 $ echo iiii|perl -nwle 'print 1 + s/j//g' 1 $ echo iiii|perl -nwle 'print 1 + ""' #if it really were the empty string, this would happen: Argument "" isn't numeric in addition (+)

8/11/2010 4:54:17 PM 1 jida...@jidanni.org
simple indexing in Perl?

I'm new to database programming and just previously learnt to use loops to look up and enrich information using the following codes. However, when the tables are large, I find this process is very slow. Then, somebody told me I can build a database for one of the file real time and so no need to read the file from the beginning till the end again and again. However, perl DBI has a lot of sophisticated functions there and in fact my tables are only large but nothing special, linked by an ID. Is there any simple way to achieve the same purpose? I just wish the ID can be indexed

8/10/2010 7:39:25 AM 9 "ela" <...@yantai.org>
Need Google AdSense Account

Need Google AdSense Account Looking For Google AdSense Account Approval. You Came To The Right Place. Just Visit This & Get Your Google AdSense Account , http://newadsenseaccount.wordpress.com/2010/08/10/need-google-adsense-account/ More Details : I am Approving Google AdSense Accounts From The Past 1 Year. 100% Legal. No Gimmick. No Trick. All Accounts Approved Manually By The Google AdSense Team. So There Is No Problem Of Getting Your Account Banned. If You Are Interested Then , Send Your Full Name,Address & Mobile Number To "ADSENSEINCOME4AL

8/10/2010 7:14:28 AM 0 nikker <m.52ah...@gmail.com>
Click the Russian Grial details and Citizenship Jobs Details

Click from Russian Giral Allbamm Beautiful profiles with photos and videos add your proflie for free and start receiving letters and your Jobs details and Passpost details in p.R in Russian citizenship I LOVE ALL RUSSIAN @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ http://123maza.com/25/nike286/ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

8/10/2010 3:40:04 AM 0 kuruva k <kuruva...@gmail.com>
Matrix Ops with Rational Output

All, I have no experience with Perl modules that do linear algebra. I've searched CPAN and see several. Can someone advise me on what to use? I'd like to have the ability to start with a matrix with integer entries, put it in reduced row echelon form, with all of the entries as rational numbers, such as: A = 4 0 0 2 -1 -3 0 1 0 2 0 -1 ans = 1 0 0 1/2 0 1 0

8/10/2010 3:25:53 AM 1 David <dwarnol...@suddenlink.net>
OO instantiate

I have a new and execute method in my module. I want to propogate the args from new to execute, but i get a null variable, plz see below: package Cmtname; use Stnet::DBH; sub new { my ($class, %opts) = @_; my $self = \%opts; bless $self, $class; return $self; } sub execute { my ($self, %opts); use Data::Dumper;die 'DDDEBUG' . Dumper($self); # This is null } If i dump $self in "new" i get the correct args, in "execute" it is null, what am i missing? here is test script: #!/bin/perl use strict; use lib '/web/docs/secure/dev/'; #Just loca

8/9/2010 10:50:50 PM 4 monkeys paw <mon...@joemoney.net>
setting path in command window using perl

Hi, here is my problem. I have a perl script that executes multiple command line calls as follows: system("XCOPY", "$s_currentWorkingDirectory\\KCPSM3.EXE", $s_tempLocation, "/R", "/Y") == 0 or die "File KCPSM3.EXE could not be copied: $!\n"; system("XCOPY", "$s_currentWorkingDirectory\\ROM_form.coe", $s_tempLocation, "/R", "/Y") == 0 or die "File ROM_form.coe could not be copied: $!\n"; This is an example. There are many more with different programs being called. My problem is that I need to set the path to a certain batch file before calling the programs. It seems every

8/9/2010 8:41:13 PM 4 Amish Rughoonundon <amishrughoonun...@gmail.com>
perl programming language

http://www.thevoid1.net -- this is my new programming language written in perl, the completed version will be posted there some point... -Robin

8/7/2010 7:15:10 AM 2 Robin <rob...@cnsp.com>
Question re calling subroutines

I typically call subroutines without using parenthesis, e.g., &abc;. I have one routine where I pass variables and I call it as: &abc(A,B,C);: sub abc { $A = $_[0]; B=$_[1]; C=$_[2]; } Should I be using parenthesis at the subroutine, i.e., sub abc (A,B,C) {...} and why? TIA, Herb

8/6/2010 8:49:33 PM 14 He...@earthlink.net
Does this match any number or just single digit ones?

Will this line update $page with a number if it's double digit (ie 10+) or does the code need to change? my ($page) = $page_number_txt =~ /PAGE (\d) >/;

8/6/2010 8:00:09 PM 4 "Thomas Andersson" <tho...@tifozi.net>
sysopen failures

Hello, A script saves mails sent by a crontab--so, there may be bursts... It uses sysopen, I assume to make sure it doesn't overwrite existing files. At times, we get bursts of errors (File exists), which I trace to the sysopen call. However, I cannot find that all the corresponding files would have existed. I read the doc and get to: In many systems the "O_EXCL" flag is available for opening files in exclusive mode. This is not locking: exclusiveness means here that if the file already exists, sysopen() fails. "O_EXCL" may not

8/6/2010 5:06:46 PM 15 Marc Girod <marc.gi...@gmail.com>
Used Car Sri Lanka

Used Car Sri Lanka Used Car Sri Lanka, Not Only For Sri Lanka, All Over The World, Just In A Single Click You Will Get A Car At A Very Price. http://www.caradzone.com/ Sell Your Used Car Or Buy Our Car In Seconds From Sri Lanka i.e Used Car Sri Lanka . More Details : CarAdZone.com is a advertising solution for all of your vehicles and related services. Our operation is spread in all over the world and once you select your location you will see only the advertisements related to your location.

8/5/2010 12:00:26 PM 0 hot girl <m.76ah...@gmail.com>
Convert string to date/time MS Access will accept at import

I have my data collector script finished now and it works fine. Now my problem is that MS Access throws a hissyfit when I try to import my data. At first I thought it was the AutoNumber field that caused it but it isn't as I found the report saying that I get "Type Conversion Failure" on every filed containing time info. All my collected data have the time info stored in this format "Jul 28 18:34" (Tab delimitered) and now I guess I need to convert all those on the fly before they are stored to something Access will accept. Is there any (hopefully easy) way to do this? Bes

8/5/2010 12:17:33 AM 2 "Thomas Andersson" <tho...@tifozi.net>
I think an assertion might do this?

Hey Perlistas... I wanted to replace any and all multiple sequential EOLs with a single one. This worked nicely: (a) s/(\n)\n+/$1/g; But thinking abot it some more. it occurred to me that these wouldn't quite work (b) s/(\n)\n/$1/g; (c) s/\n(\n)/$1/g; (d) s/\n\n/\n/g; because even though they are greedy, they don't retrace. And predictably they didn't work. I've never really used assertions, at least not enough to be familiar with them. I guess this would be a positive look-behind to force the engine to retrace? Can someone offer an example please where I can use s

8/4/2010 1:02:44 PM 8 Mr P <misterp...@gmail.com>
looking for Hamming+BCH+Reed - Solomon Codes in perl

Hi, do you have any idea where can I find implementations of the Hamming +BCH+Reed - Solomon Codes in Perl? Thanks in advance -Amir

8/4/2010 11:52:19 AM 1 Amir <sting....@gmail.com>

Pages: 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20









Newest Articles

Virtual Inheritance
7 min. 27 sec. ago

Simulating a Very Low IF (VLIF) receiver
9 min. 58 sec. ago

How do I insert the coordinates (centroid) of detected moving objects onto the object?
16 min. 55 sec. ago

Hardup Quark on Who Wants To Be A Millionaire
18 min. 18 sec. ago

Randsample (leave-one-out)
27 min. 56 sec. ago