Re: modification

2007-08-20 Thread John W. Krahn
Ken Foskey wrote: Thanks all, I did read that about for loops somewhere new there was something. I wonder how many times I have corrupted stuff with the expectation of having a copy?* I always make that mistake 'if( $a = 10 ) {' that is why I always 'use warnings' and, most importantly, correc

Re: modification

2007-08-20 Thread Ken Foskey
Thanks all, I did read that about for loops somewhere new there was something. I wonder how many times I have corrupted stuff with the expectation of having a copy?* I always make that mistake 'if( $a = 10 ) {' that is why I always 'use warnings' and, most importantly, correct the code. Pet peev

Re: modification

2007-08-20 Thread Paul Lalli
On Aug 20, 11:51 am, [EMAIL PROTECTED] (Gunnar Hjalmarsson) wrote: > Paul Lalli wrote: > > $array[0] = substr( $_, 256, 6 ); > > { > >no warnings 'numeric'; > > That would better be: > > no warnings qw/numeric uninitialized/; > > to cover undefined array elements. > > >printf "%06d", $

Re: modification

2007-08-20 Thread Gunnar Hjalmarsson
Paul Lalli wrote: On Aug 20, 10:47 am, [EMAIL PROTECTED] (Ken Foskey) wrote: Is there a 'better' way to do this. Well, if you're sure you know what you're doing, you could just turn the warning off in the specific scope where you don't want it. I mean, it's a warning. If you're comfortable w

Re: modification

2007-08-20 Thread Gunnar Hjalmarsson
Ken Foskey wrote: I have a piece of code that I am assured works and I cannot see why it would. Code is supposed to force undefined, zero and all space to numeric zero to stop printf being undefined. foreach my $value (@array) { if( ! $value or $value = " " ) { ---

Re: modification

2007-08-20 Thread Paul Lalli
On Aug 20, 10:47 am, [EMAIL PROTECTED] (Ken Foskey) wrote: > I have a piece of code that I am assured works Assured by whom? > and I cannot see why it would. It doesn't. > Code is supposed to force undefined, zero and all space to > numeric zero to stop printf being undefined. > > foreach my

Re: modification

2007-08-20 Thread Chris Charley
- Original Message - From: "Ken Foskey" <[EMAIL PROTECTED]> Newsgroups: perl.beginners To: "beginners perl" Sent: Monday, August 20, 2007 10:47 AM Subject: modification I have a piece of code that I am assured works and I cannot see why it would. Code is supposed to force undefine

Re: modification

2007-08-20 Thread Chas Owens
On 8/20/07, Ken Foskey <[EMAIL PROTECTED]> wrote: > > I have a piece of code that I am assured works and I cannot see why it > would. Code is supposed to force undefined, zero and all space to > numeric zero to stop printf being undefined. > > foreach my $value (@array) { > if( ! $value or $va

Re: modification

2007-08-20 Thread Paul Johnson
On Tue, Aug 21, 2007 at 12:47:22AM +1000, Ken Foskey wrote: > I have a piece of code that I am assured works and I cannot see why it > would. Code is supposed to force undefined, zero and all space to > numeric zero to stop printf being undefined. > > foreach my $value (@array) { > if( ! $va

Re: Modification of table -limited by programming constraint

2006-07-18 Thread D. Bolliger
Nath, Alok (STSD) am Dienstag, 18. Juli 2006 15:30: > Hi, > In my current program I am not sure where to > use rowSpan so that I create table like below. > In otherwords, I want switch 1 to appear > once only for the two rows. > > My main constraint is I dont want to change the program > style to c

Re: Modification of table -limited by programming constraint

2006-07-18 Thread Rob Dixon
Nath, Alok (STSD) wrote: Hi, In my current program I am not sure where to use rowSpan so that I create table like below. In otherwords, I want switch 1 to appear once only for the two rows. My main constraint is I dont want to change the program style to create such a table . Any help will

RE: modification and inode change times

2004-03-20 Thread Chance Ervin
http://sourceforge.net/projects/filewatch/ This does what your looking for and much more. It will tell you what changes inside the file have taken place. - InteleNet Communications Inc. "Help me help you." Chance Ervin - SCSA --Jerry Magu

Re: Modification of a read-only value attempted

2003-10-16 Thread Jeff 'japhy' Pinyan
On Oct 16, Rajat Garg said: >($1, $2) = split(/=/,$i); You can't assign to the $ variables. Choose different variable names. -- Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/ RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/ what does y//

RE: Modification of a read-only value attempted

2003-08-15 Thread Scott Taylor
At 12:45 PM 08/15/2003, Bob Showalter wrote: Scott Taylor wrote: > Hello all, > > I'm trying to open a file (3 separate files anyway) and iterate > through them In this portion of my script: > > foreach ("dct","lfl","usa"){ >my ($co_id) = $_; >print "$co_id\n"; >system "rcp orion:/u1/sy

RE: Modification of a read-only value attempted

2003-08-15 Thread Bob Showalter
Scott Taylor wrote: > Hello all, > > I'm trying to open a file (3 separate files anyway) and iterate > through them In this portion of my script: > > foreach ("dct","lfl","usa"){ >my ($co_id) = $_; >print "$co_id\n"; >system "rcp orion:/u1/syncdata/drvdat.$co_id > /tmp/drv.temp" || ne

Re: modification on hashes/unique values

2002-12-02 Thread Chris
The definition of a hash requires that all keys are unique. To use a hash the way you want, you may need to make the value for the key "Acorn Drive" a pointer to an array containing the data you intend [A, B, ...]. You can use an "anonymous" array to hold the data you want. (This is what the

RE: modification on hashes/unique values

2002-12-02 Thread wiggins
If I understand correctly what you are trying to do can't be done with "normal" hashes. Normally a hash can contain only one value for each unique key, and therefore you overwrite the value each time you assign a value to a particular key. So you have two obvious options (in other words that I

RE: modification on hashes/unique values

2002-12-02 Thread Beau E. Cox
Oh Ben, Hash keys MUST be unique! If you say something like: Acorn Drive => A Acorn Drive => B Acorn Drive will have the value B (the last one overwrites to previous). What you may need is a hash of arrays: Acorn Drive => ['A', 'B',] Aloha => Beau. -Original Message- From: Ben Crane

Re: modification of stat problem

2002-11-25 Thread Rob Dixon
Ben Whitespace in filenames is only a problem when it could look like the end of the filename, such as in a command parameter list. When the filename is alone in a Perl variable there is no ambiguity and the whitespace is treated like any other character. Cheers, Rob - Original Message ---