Re: OT: Python

2013-10-26 Thread Ed Davis
more these days) for a living. Perl is brilliant. Everyone should be told :-D > On 27 Oct 2013, at 01:04, David Christensen wrote: > > On 10/26/13 16:25, Ed Davis wrote: > > I would think the question being asked isn't 'OT' which is namely: what's > > r

Re: OT: Python

2013-10-26 Thread Ed Davis
ion by my own. > > >> On Oct 26, 2013, at 7:25 PM, "Ed Davis" wrote: >> >> I would think the question being asked isn't 'OT' which is namely: what's >> runtime v compile time ... (and Python's .pyc's are sort of in the middle

Re: OT: Python

2013-10-26 Thread Ed Davis
I would think the question being asked isn't 'OT' which is namely: what's runtime v compile time ... (and Python's .pyc's are sort of in the middle). Id think a beginners list first task would be to help you make the choice? > On 27 Oct 2013, at 00:15, wrote: > > Thanks for answering my quest

Re: OT: Python

2013-10-26 Thread Ed Davis
I got past the white space sensitivity through determination (using vi) and through sensible solutions (eventually using BB Edit on my mace which can '4 space tab equiv'). I use both but find perl fits my work well and so my second language has become JS. I support that this is not a language v

Re: Sleep

2013-09-16 Thread Ed Davis
(DOH - Obviously I was using 10 seconds to test!) On 16 Sep 2013, at 00:49, "John W. Krahn" wrote: > Shawn H Corey wrote: >> On Sun, 15 Sep 2013 13:00:36 -0700 >> Unknown User wrote: >> >>> If my perl script has a sleep for say 300 seconds, when the sleep is >>> being run is there any way i ca

Re: Sleep

2013-09-16 Thread Ed Davis
multiple times, or the same sub will overwrite the counter file so the number will start to jump around all over the place. Hope thats useful. Ed On 16 Sep 2013, at 00:49, "John W. Krahn" wrote: > Shawn H Corey wrote: >> On Sun, 15 Sep 2013 13:00:36 -0700 >> Unknown User

Re: Perl Script for parsing log files.

2013-05-08 Thread Ed Davis
Hi My first contribution to the list! Probably the simplest way to do this is (once you have apache2 installed and working) to create a script that looks a bit like this: !#/usr/bin/perl use strict; use warnings; sub mylogparser { Your script } mylogparser (); print "Content-type: text/htm

Re: Transitioning from BASH to Perl

2012-03-16 Thread Ed Dela Cruz
ed > > -- > Owen > > perldoc is another great resource. I think most linux distros can be installed through package management. perldoc -f grep perldoc -f tr perldoc perlretut perldoc perlrequick There's also a website http://perldoc.perl.org/index.html regards, Ed

Re: [linux] unable to check in code to svn when files contain spaces or characters

2011-01-26 Thread ed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Mon, Jan 24, 2011 at 08:21:33PM +, ed wrote: ... > @arg = [ "svn", "add", "File with spaces" ]; My bad... as pointed out by Shlomi Fish, this is incorrect and should instead be: @arg = ( "svn"

Re: [linux] unable to check in code to svn when files contain spaces or characters

2011-01-24 Thread ed
s in perl or in shell . If in perl, then you may want to pass the arguments to the system command as an array, so: @arg = [ "svn", "add", "File with spaces" ]; system( @arg ); Hope this helps - -- Best regards, Ed http

Re: Reading from multiple pipes

2009-09-30 Thread Ed Avis
Ed Avis waniasset.com> writes: >I'd like to fork several child processes and read lines from each It appears that IO::BufferedSelect does what I want! From its documentation: use IO::BufferedSelect; my $bs = new BufferedSelect($fh1, $fh2); while(1) { my @

Re: Reading from multiple pipes

2009-09-30 Thread Ed Avis
Ed Avis waniasset.com> writes: >I'd like to fork several child processes and read lines from each, There is IO::Select which provides a convenient way to see which filehandles have data for reading. But there is no guarantee that the data available will form a complete line. I am

Reading from multiple pipes

2009-09-30 Thread Ed Avis
{ # magic happens here say "got a line from one of them: $_"; } Is there a CPAN module or well-known recipe that can provide the necessary magic to poll both filehandles and read a line from either? If not, I will write something using select() and sysread()

Re: two questions

2009-08-05 Thread Ed Avis
>2. what's the standard module or method to generate a random string, for >example >the string will be used as part of url. If you want to use the string in a URL then it cannot be truly random, because not every character can appear in a URL. Why not just generate a random numb

Inverting a hash safely

2009-08-04 Thread Ed Avis
t;So I don't think it is fair to say that inverting a hash is never needed, >>although you can certainly minimize the need for it if you build your own >>data structures carefully. >To be specific, I said I never had to invert a hash since I build all >the data structures I need while validating the input. OK. -- Ed Avis -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Inverting a hash safely

2009-08-04 Thread Ed Avis
age given might in theory differ from one run to the next or between different perl interpreters. -- Ed Avis -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Inverting a hash safely

2009-08-04 Thread Ed Avis
It's a question of taste, but I would prefer to just get one hash as the return value, and invert it if I need to. So I don't think it is fair to say that inverting a hash is never needed, although you can certainly minimize the need for it if you build your own data structures careful

Re: Inverting a hash safely

2009-08-04 Thread Ed Avis
as really making a noticeable difference to performance, by all means switch to the unsafe but slightly faster version. >And if you feel like it, create a function that reverses > >(a => 1, b => 3, c => 1) => (1 => ['a','c'], 2 => ['b']) Yes, I often end up writing that kind of code too, so this would be handy. -- Ed Avis -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Inverting a hash safely

2009-08-03 Thread Ed Avis
::safe_hash_invert'. And, for those who like that kind of thing, a simple way to audit existing code for bugs (or latent bugs) caused by hash reversing without checking; I would ideally provide both safe_hash_invert and unsafe_hash_invert so that the programmer can be explicit about what's

Re: while (<>) and wildcards on DOS/Windows

2009-08-03 Thread Ed Avis
Peter Daum yahoo.de> writes: >With more recent Perl versions, when >a script is called with '*.xyz' it will just try to open '*.xyz' and >fail. What version of Perl do you have? (perl -V) -- Ed Avis -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org

Inverting a hash safely

2009-08-03 Thread Ed Avis
I see Hash::Util and Hash::MoreUtils on CPAN but neither provides such a function. Before I write one myself I wanted to check if there is already a standard implementation. -- Ed Avis -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: code to fetch, configure, and build two library packages - can it be better?

2008-08-31 Thread Ed
On Aug 25, 8:18 am, [EMAIL PROTECTED] (Yitzle) wrote: > On Sun, Aug 24, 2008 at 9:29 AM, Ed <[EMAIL PROTECTED]> wrote: > > On Aug 21, 8:32 am, [EMAIL PROTECTED] (Yitzle) wrote: > >> On Wed, Aug 20, 2008 at 7:37 AM, Ed <[EMAIL PROTECTED]> wrote: > >> I migh

Re: code to fetch, configure, and build two library packages - can it be better?

2008-08-25 Thread Ed
On Aug 21, 8:32 am, [EMAIL PROTECTED] (Yitzle) wrote: > On Wed, Aug 20, 2008 at 7:37 AM, Ed <[EMAIL PROTECTED]> wrote: > > Howdy all! > > > As part of a test script, I have to make sure my test machine (i.e. > > the machine that is running the script) has librarie

code to fetch, configure, and build two library packages - can it be better?

2008-08-21 Thread Ed
Howdy all! As part of a test script, I have to make sure my test machine (i.e. the machine that is running the script) has libraries zlib and hdf5. I do that with this code. Is there a better way? if ($opt{netcdf4} && ! -e $install_file) { copy("/upc/share/ed/d

Re: OT. Cron jobs

2007-03-11 Thread Ed
Hi, Would it not be easier to just launch the perl script from a bash script in the lines of: #!/bin/bash while [ 1 -ne 2 ]; do /foo/bar/perlscript.pl sleep 15 done Still a Newb in perl so if it can be done in perl... let us know ;) Just a thought. -Ed On Sunday 11 March

Re: Filesys::DiskUsage vs shell du

2007-02-13 Thread Ed
Many thanks for the info John. I knew I was missing something obvious. Enjoying learning Perl immensely! -Ed On Tuesday 13 February 2007 00:39, John W. Krahn wrote: > Ed wrote: > > Hi all, > > Hello, > > > I am having problems with the difference in output between

Filesys::DiskUsage vs shell du

2007-02-12 Thread Ed
ome/jdoe/perl 6144/home/jdoe/perl Why can I not get the same values? I have played around with: { 'sector-size' => 1024 } { 'human-readable' => 1 } { 'Human-readable' => 1 } { recursive => 1 } ... but not one of them seems to give me the same value

RE: Redefining the behaviour of warn.

2007-01-10 Thread Christian, Ed
> > On 1/10/07, Peter Scott <[EMAIL PROTECTED]> wrote: > > > On Wed, 10 Jan 2007 07:37:24 -0500, Muttley Meen wrote: > > > > I have the code: > > > > > > > > $SIG{__WARN__} = sub { print $_[0]; } ; > > > > > > > > > > perldoc -f die > > > > > > (perldoc -f warn should probably be clearer on this.)

RE: Redefining the behaviour of warn.

2007-01-10 Thread Christian, Ed
> On 1/10/07, Peter Scott <[EMAIL PROTECTED]> wrote: > > On Wed, 10 Jan 2007 07:37:24 -0500, Muttley Meen wrote: > > > I have the code: > > > > > > $SIG{__WARN__} = sub { print $_[0]; } ; > > > > > > > perldoc -f die > > > > (perldoc -f warn should probably be clearer on this.) > > > Already did th

RE: general subroutine question

2006-08-30 Thread Christian, Ed
> Is there a commonly known way or method to limit the > number of arguments that a subroutine can store or > pass? > perldoc perlsub Look there for "Prototypes". -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Looking for a faster way of getting a directory listing from a disk

2006-07-14 Thread Ed Panni
y1; # append the array if more than one disk is selected push(@array, @array1); } Regards, Ed

Perl directory traversal and file operation

2006-07-10 Thread Ed
es and usage and the "wanted" function. Where can I look to find some modules and functions for this? Thanks, -- Ed

excel conditional format

2006-07-10 Thread Ed Panni
I have been able to make the text turn red if it is less than the comparison number. However, like I stated above I want a conditional format of the cell for the +-2% change Any help would be appreciated Regards, Ed Panni # Setup spreadsheet $column = 'A';

RE: reading Perl syntax

2006-06-07 Thread Christian, Ed
> > Merely referencing a key in a hash sets it into the hash, > though with a > > value of undef. > > This turns out not to be the case. In Perl, merely referencing a key > in a hash doesn't change the hash. Some non-Perl hash implementations > do change the hash in those circumstances, though, s

Extracting variables from a string

2006-04-18 Thread Ed
) { print $UserName, $passwd, $Comment, $FullName; } } Thanks, -- Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

sorting an array of arrays by arr_el[$idx][2] (or something like that)

2006-04-17 Thread Ed
I'm still hobbled by my thinking in C problem so I'm looking for a way to do this. I'm reading from a file and constructing an array of arrays. Here's an example of what's in the file: net localgroup Field Aidan /ADD net localgroup Internal Aidan /ADD net localgroup CM Aidan /ADD net localgroup Do

Re: does rename have problems on W2K, W Server 2003, etc?

2006-04-15 Thread Ed
Dr. Ruud, " See news:[EMAIL PROTECTED] (that Message-ID is far from RFC compliant)" Say what? On 4/15/06, Dr.Ruud <[EMAIL PROTECTED]> wrote: > Ed schreef: > > > I took the section of code and ran it from the command line and it > > works fine, so it must

Cannot access file because it is being used by another process

2006-04-15 Thread Ed
lename"; print "$rightslistfilename"; print "$!"; print "$^E"; } if( ! rename $tmpfilename, $rightslistfilename ) { print "Rename ERROR!"; print "$tmpfilename"; print "$rightslistfilename"; pr

Re: does rename have problems on W2K, W Server 2003, etc?

2006-04-14 Thread Ed
Ok, Thanks for the suggestions. It turns out that I have a permissions/access problem, but I don't see how since I'm running as administrator!! I ran "system("whoami") and it returned Ed who is "administrator". I also did an unlink call to remove the fil

does rename have problems on W2K, W Server 2003, etc?

2006-04-14 Thread Ed
$retval = rename $tmpfilename, $rightslistfilename; print "retval: $retval"; retval is 0 and the target file never gets updated. Thanks in advance. -- Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

Re: Class::Struct: Can't access struct field elements

2006-04-11 Thread Ed
;; # dereference the hash method. print "stock: %{$store->stock}"; ### <---FAILS! Prints out the ref again with a % in front... # What about the scaler reference? # prints the reference. print "owner: $store->owner"; # prints ref # you want print

Re: Class::Struct: Can't access struct field elements

2006-04-10 Thread Ed
mind around a solution or if I have some more questions! Thanks again, Ed On 4/10/06, Jay Savage <[EMAIL PROTECTED]> wrote: > On 4/10/06, Ed <[EMAIL PROTECTED]> wrote: > > Thanks for the reply. > > > > Yes, I see I fat fingered the owner/some_owner variable. &

Re: Class::Struct: Can't access struct field elements

2006-04-10 Thread Ed
ot;? That doesn't seem right. I'm pretty stumped, so thanks for your help. I think I'm pretty close. Ed On 4/10/06, Timothy Johnson <[EMAIL PROTECTED]> wrote: > > The code you provided can't be the example taken straight out of > Programming Perl, because it doe

Class::Struct: Can't access struct field elements

2006-04-10 Thread Ed
an in Perl. I've referenced several texts and web references on the subject and get several ways to create a structure. In each case I'm unable to access any elements in the structures once they are initialized. Here is an example taken straight out of Programming Perl (

Can't compile/install module XML::LibXML either via CPAN or compile

2006-03-12 Thread Ed Young
rogeny.com. Could not chdir to L: server said: L: No such file or directory. Current remote directory is /CPAN/authors/id/L. ncftp /CPAN/authors/id/L > quit When trying to compile from the cygwin command line: Ed <mailto:[EMAIL PROTECTED]> @Xeric cd /cygdrive/d/src/perl/XML-LibXML-1.58 $ p

bleh

2005-12-27 Thread Welsh, Ed
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 unsubscribe -BEGIN PGP SIGNATURE- Version: PGP Desktop 9.0.4 (Build 4042) iQEVAwUBQ7FXHlcLJH9lmXCIAQhsBggAqpJn3SiEwHMJMr3NW0GGs9HtXeg9N2ez iUrKyVjBSZJ9g9FICFm0P1PrTwZKZuxTBM0HbVhy1FYz5frgSCLdJhDWMvK53Ic8 cFROTCWNXQBSvL8KS0AfRhkO0LEu10N5j2CBx

RE: Error on: my $sth->execute;

2005-07-18 Thread Christian, Ed
> -Original Message- > From: Ron Smith [mailto:[EMAIL PROTECTED] > Sent: Monday, July 18, 2005 12:50 PM > To: Perl > Subject: Error on: my $sth->execute; > > > Hi all, > > I'm getting an error when trying to do an INSERT statement to > a MySQL database. There's something I'm not under

RE: Urgent Help with functions

2005-05-10 Thread Christian, Ed
-Original Message- From: Madhur Kashyap [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 10, 2005 12:34 PM To: beginners@perl.org Subject: Urgent Help with functions Can someone help me out with this simple code? It gives an error saying: Illegal division by zero at test.pl line 4. Exit 255

Net::RawIP Compile

2004-12-30 Thread Welsh, Ed
is deprecate +d RawIP.xs: In function `XS_Net__RawIP_dispatch': RawIP.xs:1289: warning: use of cast expressions as lvalues is deprecat +ed RawIP.xs: In function `XS_Net__RawIP_loop': RawIP.xs:1311: warning: use of cast expressions as lvalues is deprecat +ed make: *** [RawIP.o] Error 1 E

RE: :Pcap Install test fail

2004-12-29 Thread Welsh, Ed
shell and the test failed as well. I did a force install and the install completed and it appears to be working fine. Not sure if will be any repercussions in the future though. -Original Message- From: Welsh, Ed [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 29, 2004 11:23 AM To:

Net::Pcap Install test fail

2004-12-29 Thread Welsh, Ed
: The only error is "bad statistics". Has anyone else seen this problem? How can I further troubleshoot the issue? Ed Welsh The information transmitted in this e-mail is intended only for the addressee and may contain confidential and/or privileged material. Any in

RE: Help optimizing script

2004-12-07 Thread Ed Christian
JR wrote: > Greetings everyone, > > I'm very new to perl, so please don't laugh at my script ;-) > I wrote this script to login to my work box from home and change a > hosts > file to reflect my home ip address. I know there is a way to do this a > lot quicker and prettier. This is really just a

RE: Change ctime of a file ?

2004-12-03 Thread Ed Christian
Jeff Westman wrote: > Is it possible to change the 'create timestamp' (ctime) of a file, > and if so, how? This would be the perl equivalent of Unix' "touch" > command. If you're looking for a close replacement for "touch", try: perldoc -f utime "Changes the access and modification times on e

Re: Searching tecknical documentation

2004-11-16 Thread Ed Budd
K-sPecial wrote: Randal L. Schwartz wrote: "K-sPecial" == K-sPecial <[EMAIL PROTECTED]> writes: K-sPecial> Damn (if I may say so), nice link. Die, pirate scum. You insult me personally by pirating my words. How do you expect me to have the means to write future books? I simply said it was a nice

RE: Printing to a file

2004-10-26 Thread Ed Christian
Ed Christian wrote: >> #!/usr/bin/perl >> >> + >> use warnings; >> use strict; >> use File::Find; >> >> find sub { >> return unless -f; >> return unless $_ =~ /.\d+$/; >> print "$_\n"; >> #print &q

RE: Printing to a file

2004-10-26 Thread Ed Christian
> #!/usr/bin/perl > > + > use warnings; > use strict; > use File::Find; > > find sub { > return unless -f; > return unless $_ =~ /.\d+$/; > print "$_\n"; > #print "$File::Find::name\n"; > > + > open(SD, "$_") or die "can't open $_ $!\n"; > #my $fh = IO::File->new(

RE: array of references

2004-10-25 Thread Ed Christian
Scott Pham wrote: > I've been thinking about this and not sure how to approach this > problem. Say I want to create an array of 4 array references, thats > easy since I know that there will be 4 array references, how would I > do this dynamically? Say if one I only needed 2 references and > another

RE: SIGZERO

2004-09-24 Thread Ed Christian
Errin Larsen wrote: > On Fri, 24 Sep 2004 10:31:36 -0400, Ed Christian <[EMAIL PROTECTED]> > wrote: >> Errin Larsen wrote: >>> Hi Perlers, >>> >> >> >> >>> >>> if( kill 0 => $pid ) { >>> >> >&g

RE: SIGZERO

2004-09-24 Thread Ed Christian
Errin Larsen wrote: > Hi Perlers, > > > if( kill 0 => $pid ) { > Forgive me if I presume too much, but shouldn't the above be: if( kill 0, $pid ) { perldoc -f kill -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Questions regarding use: "optional" modules, and "refreshing" modules

2004-08-31 Thread Ed Christian
return $self->{DATA}{$val}; >> >> I have code which runs daemonized (using Proc::Daemon) that begins by >> using the Prefs config module. It's quite possible that the >> parameters in the Prefs config module get modified. I may need my >> daemonized code to "refresh&

Questions regarding use: "optional" modules, and "refreshing" modules

2004-08-31 Thread Ed Christian
;{DATA}{$val}; I have code which runs daemonized (using Proc::Daemon) that begins by using the Prefs config module. It's quite possible that the parameters in the Prefs config module get modified. I may need my daemonized code to "refresh" its copy of the Prefs config modul

RE: Efficient Formatting

2004-07-21 Thread Ed Christian
Kent, Mr. John (Contractor) wrote: > Greetings, > > Want to print out a formattted line of numbers > > Is there a way to avoid having to: > >> printf "%8d %8d %8d . ten times",$num1,$num2,$num3, ... , >> $num10; ? > > Something like > printf "%8d" * 10, @numray; > How 'bout: printf "%8d

RE: Still getting warning for "Use of uninitialized value in join or string " (Please Help)..

2004-07-15 Thread Ed Christian
'uninitialized';" to quiet that warning. See: perldoc warnings perldoc perllexwarn Otherwise, you'll have to clean up your SELECT statement and ensure that all of the fields you're looking for are populated. (add WHERE clauses and such) Hope that helps, - Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>

RE: [The Subroutine...revisited] What is "Use of uninitialized JOIN" error?

2004-07-13 Thread Ed Christian
jason corbett wrote: > Here is what I am doing. I shortend the sub, using local variables, > and simplifying the whole thing to just print to screen. I use your > loop once I collect the records into the @record variable and join > them with ","... > > Still to no avail, that menacing warning s

RE: sorting multi dimensional array

2004-03-17 Thread Ed Christian
N, Guruguhan (GEAE, Foreign National, EACOE) wrote: > Hi All, >I have a multi dimensional array build like this " > $array[$i][$j]". This array has some 50 values and I would like to > sort this in ascending order. Can somebody tell me how to do this? > Quick and easy (but certainly

Re: interacting with table layouts using DBI

2004-03-03 Thread Ed Pigg
On Mar 2, 2004, at 5:53 PM, Andrew Gaffney wrote: Is there an easy way with DBI (or anything other modules) to retrieve and modify the layout of database tables in a MySQL DB? You might want to look at Class::DBI on CPAN. Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: Writing style

2004-01-09 Thread Ed Pigg
On Friday, January 9, 2004, at 09:58 AM, Jan Eden wrote: Hmm.. the perlfaq documents do not seem to be installed on my system (Mac OS 10.3.2, Perl 5.8.1). Very strange. [jan:~] perldoc -q "HERE documents" No documentation found for "perlfaq1". No documentation found for "perlfaq2". No documentat

RE: Looping through file for regex

2004-01-02 Thread Ed Christian
James Edward Gray II wrote: > On Jan 2, 2004, at 10:10 AM, Paul Kraus wrote: > >>> Don't do that. The foreach reads the whole file into memory and >>> then walks it line by line. If we just want one at a time, let's >>> fetch them that way >> >> I don't agree with this. > > And I don't underst

RE: Problems with Inheritance in GD::Graph

2003-12-17 Thread Ed Christian
Dan Anderson wrote: > I am trying out GD::Graph, which is a CPAN module that creates a > method new, and then for each graph type inherits that new method (I > think -- I had to open the code). > > So I tried calling: > > my $graph = GD::Graph::bars->new(400, 600); > > And I get the error: >

RE: RE : Regular expressions

2003-12-17 Thread Ed Christian
Hemond, Steve wrote: > Okay, here`s the real problem, > > # ps -efA |grep dispatch > cspenard 33958 45716 0 09:08:05 pts/8 0:00 > /prog/gena/8.1.1/bin/dispatch genie -u /prog/gena/impress/gui/im > msirois 37212 9842 0 08:41:17 pts/1 0:04 > /prog/gena/8.1.1/bin/dispatch genie -u /prog/gena

RE: initialising a list of variables

2003-10-03 Thread Ed Christian
> my $fred=$ginger=''; Should be: my $fred = my $ginger = ''; > my ($fred,$ginger)=''; Should be: my ($fred,$ginger) = ('',''); -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Perl Newbie - Need good book recommendation

2003-09-27 Thread Ed Yost
Hi all, I am a complete newbie to perl and have no programming experience. Do any of you have a good recommendation on a book or resource for a beginner such as myself? Thanks, Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Read dir / sort

2003-08-22 Thread Ed Christian
Paul Kraus wrote: > Ok tested that theory and it is exactly what it is doing. That is not > a good thing. How can I force it to read the directory based on file > date instead of the way windows last sorted it. That does not seem > right to me that it would function like this. > > foreach ( readdi

RE: scope of variable carrying 'for ($n1..$n2){}'

2003-07-23 Thread Ed Christian
> -Original Message- > From: West, William M [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 23, 2003 9:21 AM > To: [EMAIL PROTECTED] > Subject: scope of variable carrying 'for ($n1..$n2){}' > > > for (1..19){ > for (1..19){ > print $_ > }} > > prints out the numbers 1 to 19 nin

Is $1 ever undefined or set to null?

2003-07-21 Thread Ed Christian
string before every regexp if I'm to test based on the results of that regexp? Thanks! - Ed -=-=-=-=-=- #!/usr/bin/perl -w use strict; use warnings; while () { chomp; /(\d+)/; print "\$1: $1\n"; } __DATA__ 1 2 a 3 Expected results:

[OT] RE: Looking for elegance ...

2003-07-10 Thread Ed Christian
http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=persnickety http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=pernickety Though "pernickety" seems to have evolved 100 years before "persnickety", "persnickety" seems to be the preferred spelling... (taken from Merriam-Webster's Onli

RE: sorting thoughts

2003-01-29 Thread Ed Christian
Undoubtedly not the best way of doing this, but here's one stab at it. This assumes you have your data stored in an array as a single string, rather than having an array of array pointers. my @array = ('fred:lucy:24', 'john:jane:10', 'frank:mary:5'); @array = sort { my @a_vals = split (':', $a);

RE: Trouble with hash lookup

2003-01-28 Thread Ed Christian
Try replacing "==" with "eq" print "$lookup{$key}\n" if $key eq $user; > -Original Message- > From: Kipp, James [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 28, 2003 3:12 PM > To: [EMAIL PROTECTED] > Subject: Trouble with hash lookup > > > Should be a simple question. I am tryin

Can't install Storable

2003-01-27 Thread Ed Sickafus
ons. Of course /sources is in root! Now what? :-( Ed )-:... beetween a rock and a hard place. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Help: trapped in a circle and can't get out.

2003-01-27 Thread Ed Sickafus
rs/id/A/AN/ANDK/CPAN-1.63.tar.gz. <<++!! BUT I JUST REMOVED IT! What's going on?? Bewildered :-( Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

HELP -- installation of Storable issues warnings ???

2003-01-27 Thread Ed Sickafus
ting Makefile for Test::Simple 1) How can I install Storable-2.05? 2) If a prerequisite is Test::More 0.41, and only Test::Simple-0.47 is available, how would Storable-2.05 even recognize Test::Simple-0.47 if it could be installed? STUCK :-( Ed -- To unsubscribe, e-mail: [EMAIL PROTECTE

"Can't locate MLDBM.pm ..."

2003-01-27 Thread Ed Sickafus
.00503/i386 -linux at /usr/lib/perl5/5.00503/ExtUtils/Install.pm line 61. mkdir /usr/lib/perl5/5.00503/i386-linux/auto/Storable: Permission denied at /usr /lib/perl5/5.00503/ExtUtils/Install.pm line 114 make: *** [pure_perl_install] Error 2 End of Log -

RE: Random Number Generation

2003-01-15 Thread Ed Christian
> -Original Message- > From: Maurice O'Prey [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 15, 2003 9:28 AM > Hi All > > How do I extract a whole number from the rand function. > > I am using rand 25000; which generates a random number with > many decimal > places, e.g. 16235.258

RE: Where do die messages go?

2003-01-14 Thread Ed Christian
Why not: (!(-e $file)) ? die "File doesn't exist: $@\n" : open (...$file...) or die "File exists but still can't open: $@\n"; > I'm not 100% confident that'll work as written. I *think* > that if the > open is successful then the die will never execute and that 'if' will > never get checked.

RE: if structure voiding string when condition not met?

2002-12-19 Thread Ed Christian
st line of sub buildexcel, and replace instances of $_[0] with $param. - Ed --- Edward A. Christian, Backbone Engineer PenTeleDataemail: [EMAIL PROTECTED] 540 Delaware Avenueweb: http://www.penteledata.net Palmerton, PA 18071

Floating point errors in Perl

2002-12-03 Thread Ed Christian
s were a known FP error, or if it has to do with the version of Perl (5.6.1) or OS (Red Hat 7.3) or hardware (dual PIII 733mhz). It took quite a bit of testing to find that small margin of error... *chuckle* TIA, - Ed -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Automate info retrieval

2002-08-21 Thread Ed Andrews
How does one create a program to: 1. log into a secure web site which requires a username and password 2. "click", or go to a specific web page within the site, parsing info from it 3. from data received from page, repeat step 2 Ed Andrews [EMAIL PROTECTED] 515-707-2000 phone 86

Re: [SAGE] Perl Question

2002-05-22 Thread Ed Lyon
It seems you've made two mistakes: o strings only returns printable strings from the file. It does not return the contents of the file made printable. So, any offset in the output will not be the offset in the file. You might want to investigate the -t option to strings. o The -b

Re: Skipped lines

2001-05-04 Thread Ed Keer
Answer: $b[$a-1]"; It is sitll happening with this program. Here is the output I'm, getting: C:\Perl\bin>perl array3.pl Enter the line number: 4 Enter the lines , end with ^Z: one two three four five C:\Perl\bin> After "five" I hit a return and then ^Z, but the program d

Skipped lines

2001-05-04 Thread Ed Keer
int your list in reverse.\n"; >print reverse(@list); the output skips over the first print line. I have a HP PC with Windows ME. Any ideas on what could be goin on here? Ed __ Do You Yahoo!? Yahoo! Auctions - buy the things you w