Re: Program to write code

2004-01-22 Thread Owen
On Wed, 21 Jan 2004 19:32:56 -0300 "Marcelo" <[EMAIL PROTECTED]> wrote: > Hi, could anyone recommend a good program to write code, currently using notepad. If you are using Windows, there are a number of "Notepad" improved editors. Google for "windows text editors" and you will get them all I gu

RE: Loading libraries into a static Perl

2004-01-22 Thread NYIMI Jose (BMB)
Try pp (Perl Packager): http://search.cpan.org/~autrijus/PAR-0.79/script/pp#NOTES C:>pp -o our.exe our.pl More info at: http://par.perl.org/ HTH, José. -Original Message- From: Shawn Sharp [mailto:[EMAIL PROTECTED] Sent: Wednesday, January 21, 2004 9:06 PM To: [EMAIL PROTECTED] Subje

Upload files and directories (MORE INFO)

2004-01-22 Thread Lone Wolf
I am transferring the data from a Redhat 9 machine to an IIS server run by my ISP. I just tried running rsync and it was not responsive (left it on overnight in fact to give it time to try). :( Thanks! Robert -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAI

Learning to use map and grep

2004-01-22 Thread Paul Kraus
This is a simple bit of code that scans through a file and determines the width setting for columns that will eventually be written out using spreadsheet::writexcel. It works fine but I am curious if there is a way to do it with map or grep that would be better? This is more for learning the pract

Re: Learning to use map and grep

2004-01-22 Thread James Edward Gray II
On Jan 22, 2004, at 8:24 AM, Paul Kraus wrote: This is a simple bit of code that scans through a file and determines the width setting for columns that will eventually be written out using spreadsheet::writexcel. It works fine but I am curious if there is a way to do it with map or grep that wo

RE: Learning to use map and grep

2004-01-22 Thread Paul Kraus
Lol opps. my $count = 0; foreach ( @record ) { my $length = length( $_ ); $widths[ $count ] = $length if ( $widths[ $count ] < $length ); $count++; push ( @sheet, [ @record ] ); } Paul Kraus --- PEL Supply Company Network Administrator > --

search an replace

2004-01-22 Thread rmck
Hi This scripts sucks in a 109mb file and i'm trying to do a search and replace on unxtime to the format from strftime. Which is working... But I run this system call and it took allnight to run :( So I killed it... Any other suggestions to reach my goal. #!/usr/bin/perl use strict;

Re: search an replace

2004-01-22 Thread Steve Grazzini
rmck wrote: But I run this system call and it took allnight to run :( You were asking perl to rewrite the whole file for every line you wanted to change. #!/usr/bin/perl use strict; use warnings;# or just use Foo::Monkey :-) use POSIX qw(strftime); die "Usage: $0 FILES\n

Re: search an replace

2004-01-22 Thread James Edward Gray II
On Jan 22, 2004, at 10:13 AM, rmck wrote: Hi Hello. This scripts sucks in a 109mb file and i'm trying to do a search and replace on unxtime to the format from strftime. Which is working... But I run this system call and it took allnight to run :( So I killed it... Any other suggestions to rea

RE: search an replace

2004-01-22 Thread Dan Muey
> Hi > > This scripts sucks in a 109mb file and i'm trying to do a > search and replace on unxtime to the format from strftime. > Which is working... > > But I run this system call and it took allnight to run :( > > So I killed it... Any other suggestions to reach my goal. > > Yes

RE: search an replace

2004-01-22 Thread Bob Showalter
Steve Grazzini wrote: > rmck wrote: >> But I run this system call and it took allnight to run :( > > You were asking perl to rewrite the whole file for every line > you wanted to change. > > #!/usr/bin/perl > use strict; > use warnings;# or just use Foo::Monkey :-) > >

RE: Upload files and directories (MORE INFO)

2004-01-22 Thread Dan Muey
> I am transferring the data from a Redhat 9 machine to an IIS There's your first mistake, moving *from* Redhat *to* IIS :) > server run by my ISP. I just tried running rsync and it was Assuming it was using ssh, does the winblows server have ssh servce on it? > not responsive (left it on o

Calling SUPER::constructor in the constructor

2004-01-22 Thread Dan Anderson
Is it possible to call the constructor that a function inherits from its parent? I tried calling SUPER:: and SUPER-> in a constructor and got errors. Am i correct in assuming that if I rewrite the constructor that a copy of the parent object won't be available? Thanks in advance, Dan -- To u

Backup scheme

2004-01-22 Thread Ned Cunningham
Hi, I have a script that runs and zips a file, then copies it to another directory on another system. It also goes through and renames each file so that it keeps 14 files. The script I am using is just using system renames and I would like to truly do this in Perl. So I have started new. Here

RE: Calling SUPER::constructor in the constructor

2004-01-22 Thread Dan Muey
> Is it possible to call the constructor that a function > inherits from its parent? I tried calling SUPER:: and > SUPER-> in a constructor and got errors. Am i correct in > assuming that if I rewrite the constructor that a copy of the > parent object won't be available? > Perhaps some exam

RE: Upload files and directories

2004-01-22 Thread Dan Muey
Oohhh this is how its related to perl, sorry the new subject line threw me. > I am in dire need of a script that will upload everything > from one server to another one that I can cron. Right now I > have to do it by hand and with more and more updates being > done to the site, I need a way to

Re: Calling SUPER::constructor in the constructor

2004-01-22 Thread James Edward Gray II
On Jan 22, 2004, at 11:13 AM, Dan Anderson wrote: Is it possible to call the constructor that a function inherits from its parent? Yes. I tried calling SUPER:: and SUPER-> in a constructor and got errors. sub new { my $class = shift; my $self = $class->SUPER::new(@_); # .

Re: Calling SUPER::constructor in the constructor

2004-01-22 Thread drieux
On Jan 22, 2004, at 9:13 AM, Dan Anderson wrote: Is it possible to call the constructor that a function inherits from its parent? I tried calling SUPER:: and SUPER-> in a constructor and got errors. Am i correct in assuming that if I rewrite the constructor that a copy of the parent object w

Re: Backup scheme

2004-01-22 Thread Kevin Old
Ned, Here's a great script I use that is written in Perl. Might be a good starting point or might save you a ton of work. http://freshmeat.net/redir/ibackup/44196/url_homepage/ibackup HTH, Kevin On Thu, 2004-01-22 at 12:18, Ned Cunningham wrote: > Hi, > > I have a script that runs and zips a

Simplest File::Find Was: Help with fileglob: Unix vs. Windows?

2004-01-22 Thread McMahon, Chris
Thanks! That worked well. I ultimately found the documentation about how glob doesn't like spaces, but I still struggle with Windows conventions, so you saved me much effort. As a side note (which I hope justifies top-posting), I ended up needing File::Find instead of a regular

RE: threads in perl

2004-01-22 Thread david
Igor Ryaboy wrote: > Hi, > Thanks for your help, 1 more question related to your advice > Ok, How can I kill exec after it was started in different thread? > Igor > when you fork, you have the pid of the child process. when you exec, the program in exec will replaced the child process but the p

Re: Simplest File::Find Was: Help with fileglob: Unix vs. Windows?

2004-01-22 Thread Randal L. Schwartz
> "Chris" == Chris McMahon <[EMAIL PROTECTED]> writes: Chris> use warnings; Chris> use strict; Chris> use File::Find; Chris> open (OUT, ">out.txt"); Chris> my $folder = "d:/Directory"; Chris> find (\&wanted, $folder); Chris> sub wanted { Chris> print OUT "$File::Find::dir/"; Chris> p

RE: On import v. Just Do It.

2004-01-22 Thread Dan Muey
> On Jan 20, 2004, at 9:19 AM, Dan Muey wrote: > > > Oops left out a sentence > > sorry for the delay. > > >> p0: yes, one can use an import() from a package > >> to make something like the scam of 'require in line' > > > > Why is it a scam if that's what I want to do for myself? > > I pres

Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Muey
There are always comments like "you can slurp the file as long as it's not too big" or "becareful not to slurp a really big file or you'll be in trouble". So what I'd like to survey is what would be what the safest max size of a file that one should ever slurp and why? (IE if you have

Re: Survey : Max size allowable for slurping files

2004-01-22 Thread James Edward Gray II
On Jan 22, 2004, at 12:18 PM, Dan Muey wrote: There are always comments like "you can slurp the file as long as it's not too big" or "becareful not to slurp a really big file or you'll be in trouble". So what I'd like to survey is what would be what the safest max size of a file that one should ev

Re: use strict and filehandles

2004-01-22 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (B McKee) writes: >On Tuesday, January 20, 2004, at 10:34 AM, B McKee wrote: > >> Hi All, >> I'm having trouble understanding what use strict is trying to tell me. >> If I have run this program >...snipped >> open(MESSAGE, "$datafile") or die "Can

complex data file parsing

2004-01-22 Thread Hughes, Andrew
I am trying to make sense of a comma delimited log file in which multiple lines make up 1 record. Here is an example: A,W29073,Thu Apr 05 15:25:08 2001 B,W29073,Scott,S,[EMAIL PROTECTED],249 Tah Ave,,Sth San Francisco,CA,~US,5- P,W29073, X,W29073,Company Name,A,Department Name,San Francis

Newbie

2004-01-22 Thread João Figueira
Well, I'm a newbie. Just got started in Perl and was stunned by its power. The thing is i'm running the scripts in WinXP. Can you tell how to use CGI scripts in XP, because if ai try to set a CGI script as ACTION in a forme it just gets read and doesn't execute. I've heard about the bat wrapping, b

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Muey
> On Jan 22, 2004, at 12:18 PM, Dan Muey wrote: > > > There are always comments like "you can slurp the file as > long as it's > > not too big" or "becareful not to slurp a really big file > or you'll be > > in trouble". > > > > So what I'd like to survey is what would be what the safest > ma

Re: Newbie

2004-01-22 Thread Chuck Fox
[EMAIL PROTECTED] wrote: Well, I'm a newbie. Just got started in Perl and was stunned by its power. The thing is i'm running the scripts in WinXP. Can you tell how to use CGI scripts in XP, because if ai try to set a CGI script as ACTION in a forme it just gets read and doesn't execute. I've hear

Covert Date to week number

2004-01-22 Thread neill . taylor
Is their a way in PERL to covert a date to a week number Cheers Neill IMPORTANT NOTICE This email (including any attachments) is meant only for the intended recipient. It may also contain confidential and privileged information. If you are not the intended recipient

RE: Newbie

2004-01-22 Thread Dan Muey
> Well, I'm a newbie. Just got started in Perl and was stunned > by its power. > > The thing is i'm running the scripts in WinXP. Can you tell > how to use CGI scripts in XP, because if ai try to set a CGI > script as ACTION in a forme it just gets read and doesn't execute. I'm assuming you ar

RE: Program to write code

2004-01-22 Thread McMahon, Chris
I like jEdit: www.jedit.org . It runs anywhere Java runs, is lightweight, knows syntax for most major programming languages (including Perl) out of the box, and even gets plugins written for it from weirdos like Tandem people. I got turned on to jEdit because a vendor I was wor

RE: Covert Date to week number

2004-01-22 Thread Bakken, Luke
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] > Sent: Thursday, January 22, 2004 11:28 AM > To: [EMAIL PROTECTED] > Subject: Covert Date to week number > > > Is their a way in PERL to covert a date to a week number > > > Cheers > > Neill Date::Calc has w

Re: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Anderson
On Thu, 2004-01-22 at 13:18, Dan Muey wrote: > There are always comments like "you can slurp the file as > long as it's not too big" or "becareful not to slurp a > really big file or you'll be in trouble". I'd like to add that some of it depends on swap space. I've slurped well past physical me

Re: Program to write code

2004-01-22 Thread Luinrandir Hernsen
I use OptiPerl from www.xakra.com Any one else use this? L Hernsen - Original Message - From: "McMahon, Chris" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Thursday, January 22, 2004 2:32 PM Subject: RE: Program to write code > > I like jEdit: www.jedit.org .

Re: Newbie

2004-01-22 Thread Dan Anderson
On Thu, 2004-01-22 at 14:13, JoÃo Figueira wrote: > Well, I'm a newbie. Just got started in Perl and was stunned by its power. > The thing is i'm running the scripts in WinXP. Can you tell how to use CGI > scripts in XP, because if ai try to set a CGI script as ACTION in a forme it > just gets read

RE: Covert Date to week number

2004-01-22 Thread Dan Muey
> > Is their a way in PERL to covert a date to a week number > Sure , why not? You'd need to know the date format to start of course. I don't mess with dates personally a lot so I'd say have a look on search.cpan.org for a module to do that. Also perldoc may be able to help you. Sorry to be

RE: Program to write code

2004-01-22 Thread Tim Johnson
I'm a recent convert. The box higlighting for brackets is great. I wish the indenting was a little better, but with ready access to perltidy I can rectify that easy enough. -Original Message- From: Luinrandir Hernsen [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 11:43 AM

RE: Covert Date to week number

2004-01-22 Thread Tim Johnson
Check out Time::Local. It makes it easy to break down a formatted date field and put it into Perl time format. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 11:28 AM To: [EMAIL PROTECTED] Subject: Covert Date to week number Is th

Is it necessary to set the headers when using LWP::UserAgent->post

2004-01-22 Thread Dan Anderson
I noticed in the POD for LWP::UserAgent that the post method doesn't have an option to add headers. Are headers (like UserAgent:) not needed for POSTing? Or am I missing how to do it? Thanks in advance, Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Query on the telnet module

2004-01-22 Thread Singh, Ajit p
I had a very urgent query on the telnet module. I tried finding the information on the net but came up blank on the same. I am a very recent freebie and I would really appreciate it if you can help me out here. This might be a very simple problem, pardon my ignorance but u will really save me a l

RE: Covert Date to week number

2004-01-22 Thread Wagner, David --- Senior Programmer Analyst --- WGO
You could probably use something like Date::Manip or some of the other routines, but believe this would add a lot of overhead. Here is a small script which does the basics(you should be able to pull out what would constitute a sub). I just wanted to show you with a little code you could

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Muey
> On Thu, 2004-01-22 at 13:18, Dan Muey wrote: > > There are always comments like "you can slurp the file as > > long as it's not too big" or "becareful not to slurp a > > really big file or you'll be in trouble". > > I'd like to add that some of it depends on swap space. I've > slurped well pa

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Anderson
On Thu, 2004-01-22 at 16:16, Dan Muey wrote: > > On Thu, 2004-01-22 at 13:18, Dan Muey wrote: > > > There are always comments like "you can slurp the file as > > > long as it's not too big" or "becareful not to slurp a > > > really big file or you'll be in trouble". > > > > I'd like to add that s

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Muey
> On Thu, 2004-01-22 at 16:16, Dan Muey wrote: > > > On Thu, 2004-01-22 at 13:18, Dan Muey wrote: > > > > There are always comments like "you can slurp the file > as long as > > > > it's not too big" or "becareful not to slurp a really > big file or > > > > you'll be in trouble". > > > > > > I

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Anderson
On Thu, 2004-01-22 at 16:32, Dan Muey wrote: > > On Thu, 2004-01-22 at 16:16, Dan Muey wrote: > > > > On Thu, 2004-01-22 at 13:18, Dan Muey wrote: > > > > > There are always comments like "you can slurp the file > > as long as > > > > > it's not too big" or "becareful not to slurp a really > > b

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Muey
> > But I see a lot of "don't slurp that" and I was hoping for more > > clear reasons/situatuions to or not to slurp so people > positn code can have a better idea why a perosn said: > > "do(n't) slurp your file here" > > > > Basically we need to expalin why more: > > > > - Don't slurp this beca

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Anderson
On Thu, 2004-01-22 at 16:49, Dan Muey wrote: > > > But I see a lot of "don't slurp that" and I was hoping for more > > > clear reasons/situatuions to or not to slurp so people > > positn code can have a better idea why a perosn said: > > > "do(n't) slurp your file here" > > > > > > Basically we n

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Tim Johnson
I advise people to use "no warnings qw(uninitialized)" from time to time, and it usually sparks a backlash of "Don't do that!" emails, but no one has been able to actually give me a good reason why not. I think it's a similar situation. 90% of the time, you can do it with no problems, but most

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Muey
> > Good comparison, I never see advice to use no warnigns and > no strict > > though :) > > I've actually seen it a few times in code, but it's usually surrounded > by: > > ## > ## > #WARNING!! > ## > # Warnings / Strict

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Muey
> Here's another argument against slurping: When you slurp a > file all at once, even if your program isn't using up much of > the CPU, on many machines it will slow down performance > considerably if you slurp a large file (large, of course, is > still sometimes relative). If that is the onl

Re: Survey : Max size allowable for slurping files

2004-01-22 Thread James Edward Gray II
On Jan 22, 2004, at 4:12 PM, Tim Johnson wrote: Here's another argument against slurping: When you slurp a file all at once, even if your program isn't using up much of the CPU, on many machines it will slow down performance considerably if you slurp a large file (large, of course, is still some

How to take command line argument and use it to run an upgrade script.

2004-01-22 Thread Jeff Collins
I'm a perl newby. I'm looking on taking a command line argument from STDIN and use it for input to a script that upgrades software. Any examples would be greatly appreciated. Thanks = Jeffrey T. Collins [EMAIL PROTECTED] __ Do you Yahoo!? Yahoo! SiteBuilder -

Re: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Anderson
On Thu, 2004-01-22 at 17:59, James Edward Gray II wrote: > On Jan 22, 2004, at 4:12 PM, Tim Johnson wrote: > > > Here's another argument against slurping: When you slurp a file all at > > once, even if your program isn't using up much of the CPU, on many > > machines it will slow down performance

Re: How to take command line argument and use it to run an upgrade script.

2004-01-22 Thread wolf blaum
> I'm a perl newby. me too:-) Right list, I assume. > I'm looking on taking a command line argument from > STDIN and use it for input to a script that upgrades > software. Any examples would be greatly appreciated. @ARGV holds your command line arguments. call: scriptname.pl Universe 42 dougl

Re: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Anderson
On Thu, 2004-01-22 at 18:21, Dan Anderson wrote: > On Thu, 2004-01-22 at 17:59, James Edward Gray II wrote: > > On Jan 22, 2004, at 4:12 PM, Tim Johnson wrote: > > > > > Here's another argument against slurping: When you slurp a file all at > > > once, even if your program isn't using up much of

Re: How to take command line argument and use it to run an upgrade script.

2004-01-22 Thread Dan Anderson
On Thu, 2004-01-22 at 18:14, Jeff Collins wrote: > I'm a perl newby. > I'm looking on taking a command line argument from > STDIN and use it for input to a script that upgrades > software. Any examples would be greatly appreciated. STDIN is already open when your perl script starts so you can read

Re: Survey : Max size allowable for slurping files

2004-01-22 Thread Wiggins d'Anconia
Dan Anderson wrote: Very true. But you also need to look at what you're doing. A spider that indexes or coallates pages across several sites might need to slurp up a large number of pages -- which even at a few kilobytes a piece would be costly on system resources. Ironically this is the one tim

RE: Survey : Max size allowable for slurping files

2004-01-22 Thread Dan Muey
> Dan Anderson wrote: > > > > > Very true. But you also need to look at what you're doing. > A spider > > that indexes or coallates pages across several sites might need to > > slurp up a large number of pages -- which even at a few kilobytes a > > piece would be costly on system resources.

Re: How to take command line argument and use it to run an upgrade script.

2004-01-22 Thread drieux
On Jan 22, 2004, at 3:39 PM, wolf blaum wrote: [..] call: scriptname.pl Universe 42 douglas 'Zappod Beblebrox' #! /usr/bin/perl use strict; use warnings; print "You called me with ", scalar @ARGV, " Arguments.\n"; if (@ARGV) { print " Param to script: $_\n" foreach (@ARGV); } My Compliments on

Referencing Control Operators

2004-01-22 Thread John Baker
Greetings. Is it possible to reference a control operator? For example, I'd like to take this code: sub getFieldFromAllRecords { my ($self, $directive, $keyword, $matchCondition) = @_; my ($field, $regArr); # another public method within same pkg: my $allRecs

Re: complex data file parsing

2004-01-22 Thread wolf blaum
hi, > I know that each block always starts with and A in the first position of > the first line and ends with a T in the last position of the last line. isnt it a T in the first position of the last row of the set? > I know that the second line starts with a B, and the data in the 5th space > on

Re: Referencing Control Operators

2004-01-22 Thread Mark LoBue
At 12:12 PM 1/22/2004, John Baker wrote: >Greetings. > >Is it possible to reference a control operator? > >For example, I'd like to take this code: > > > sub getFieldFromAllRecords { > my ($self, $directive, $keyword, $matchCondition) = @_; > >my ($field, $regArr); > ># anoth

Re: Referencing Control Operators

2004-01-22 Thread drieux
On Jan 22, 2004, at 4:32 PM, Mark LoBue wrote: At 12:12 PM 1/22/2004, John Baker wrote: [..] and change it such that the 'unless' conditional operator is referenced conceptually similar to the following: sub getFieldFromAllRecords { my ($self, $directive, $keyword, $matchCondition) = @_; Rather

Need help comparing lines in two files

2004-01-22 Thread stuart_clemons
This very green newbie would like to compare two files, let's say File1 and File2. I want to put the difference from File2 only, into a new file, File3. For example: File1.txt oranges apples bananas File2.txt apples kiwi bananas The result I want for File3 is the new entry in File2, which is

Date and Time

2004-01-22 Thread Larry Guest
I am calling rsync from my perl script. When it runs it creates a dir where I want the backups to go. I need this dir to be the current date-time. I can get the format I want like this. my $date = `date +%m-%d-%Y_%H-%M-%S`; Which gives me 01-22-2004_20-04-14 But rsync does not

Re: Need help comparing lines in two files

2004-01-22 Thread Dan Anderson
Lets say file 1 is: foo bar ... continues on for 100 lines And file 2 is: foo baz bar ... continues on exactly the same 100 lines as file 1 Would file 2 be different from file 1 from line 2 and down? Or would it be different for line 2 and 3? Also, the keywords: next; Brings you to the next

Re: Need help comparing lines in two files

2004-01-22 Thread Dan Anderson
One more thing, those loops I was telling you about, just using a pair of brackets, also keep their scope. It's a good way to clean up with yourself, i.e. my $foo = 40; { my $foo = 50; print $foo; # prints 50 # garbage collector called on all declarations before here } print $foo; # prints

RE: Date and Time

2004-01-22 Thread Tim Johnson
You should check out the localtime() function in Perl. That way you can be sure of what you are sending to your program. perldoc -f localtime -Original Message- From: Larry Guest [mailto:[EMAIL PROTECTED] Sent: Thursday, January 22, 2004 5:07 PM To: 'Perl Beginners Mailing List' Subj

Re: Need help comparing lines in two files

2004-01-22 Thread drieux
On Jan 22, 2004, at 4:52 PM, [EMAIL PROTECTED] wrote: This very green newbie would like to compare two files, let's say File1 and File2. I want to put the difference from File2 only, into a new file, File3. For example: File1.txt oranges apples bananas File2.txt apples kiwi bananas The result I

Re: How to take command line argument and use it to run an upgrade script.

2004-01-22 Thread wolf blaum
> My Compliments on a well done piece. OT: see, a logical problem I have with newsgroups is that you learn most (at least I do) by trying to explain things you think you understood to others - "beginning explainers" however make mistakes - Thats of course not what you want in a newsgroup, si

Re: Need help comparing lines in two files

2004-01-22 Thread wolf blaum
> This very green newbie would like to compare two files, let's say File1 > and File2. I > want to put the difference from File2 only, into a new file, File3. I had a very simliar problem about a week ago, which James answerd here: http://groups.google.com/groups?q=Perl+looping+(a+lot+of) +file

Re: Need help comparing lines in two files

2004-01-22 Thread stuart_clemons
Thank you Dan and Wolf ! With the suggested changes, my foreach loop script now works as I hoped it would. (My first script did have a typo, as you pointed out, though my logic was still wrong.) I'm glad to be able to set aside my study of hashes for another day. I needed to get this prob

The Challenge of Learning to Explain - Re: How to take command line argument and use it to run an upgrade script.

2004-01-22 Thread drieux
On Jan 22, 2004, at 5:56 PM, wolf blaum wrote: [..] Nevertheless Im happy it seems this is a group were you can even learn how to explain (and what the group-iquette is anyway). [..] Good point there. A part of the struggle is always sort out what the OP is really working with, and where are th

Re: beginners Digest 20 Jan 2004 21:20:31 -0000 Issue 1978

2004-01-22 Thread B McKee
On Tue, 2004-01-20 at 16:20, Jan Eden wrote: > > I had a similar problem passing a filehandle to a sub and learned that I had to use > the typeglob instead. > HTH,Jan > > B McKee wrote: > >Hi All, > >I'm having trouble understanding what use strict is trying to tell me. > >If I have run this pro

Need help with a regex

2004-01-22 Thread stuart_clemons
This newbie needs help with a regex. Here's what the data from a text file looks like. There's no delimiter and the fields aren't evenly spaced apart. apples San Antonio Fruit oranges Sacramento Fruit pineapples Honolulu Fruit lemonsCorona del Rey

RE: Need help with a regex

2004-01-22 Thread Tim Johnson
Try this on for size: # use strict; use warnings; my @cities = (); open(INFILE,"myfile.txt") || die "Couldn't open myfile.txt for reading!\n"; while(){ $_ =~ /^\S+\s+(\S+)/; push @cities,$1; } #do something to @cities # which basically means t

Re: Need help with a regex

2004-01-22 Thread Kenton Brede
On Fri, Jan 23, 2004 at 12:01:13AM -0500, [EMAIL PROTECTED] ([EMAIL PROTECTED]) wrote: > This newbie needs help with a regex. Here's what the data from a text > file looks like. There's no delimiter and the fields aren't evenly spaced > apart. > > apples San Antonio Fruit > orang

RE: Need help with a regex

2004-01-22 Thread Tim Johnson
Ooh. That's embarassing. I didn't pay close enough attention to the OP. Some of the inside matches contain spaces. My regex should have been: /^\S+\s+(.+)\s+/ which would match: * the beginning of the line (^) * followed by one or more non-whitespace characters (\S+) * f