Re: Passing a Hash to a Subroutine

2003-02-11 Thread Ramprasad
Colin Johnstone wrote: Gidday All, Im trying to pass a hash to a subroutine now. When passing with other variables do I have to pass it as a reference like I do an array. If so how do you dereference it, if you have to at all. Where am I going wrong? sub generate_navIndex{ my ( $paramPath,

make fails with PerlIO::gzip

2003-02-11 Thread Harry Putnam
W.. I just wrote what is a major piece of coding for my limited skills, partially based on `use PerlIO::gzip' Its a log search tool that I'm enjoying using. I figured I could use it on any of my machines (4 homeboy machines) But when I went to run it on the main machine I wanted to use it on

remote win32 execn - os/patches/prods/diskusage/users

2003-02-11 Thread PRADEEP GOEL
Unix scenario: a script , say S1 , is copied to all unix test machines from a server then run from server ( daily as a CRON job ) & output is redirected to a local file on server then used to display on web page. Could someone please specify me how to get following info (commands / funcs ) on REM

Re: Help getting scripts working...

2003-02-11 Thread John W. Krahn
Mark Vanmiddlesworth wrote: > > this is a script that systematically pings every host on the network, > and writes the output to the screen. If the -n arg is specified, it > will also write to a disk. What's wrong with the syntax, especially > line 12? > > #!/usr/bin/env perl > > $x = 1; > $b =

Passing a Hash to a Subroutine

2003-02-11 Thread Johnstone, Colin
Gidday All, Im trying to pass a hash to a subroutine now. When passing with other variables do I have to pass it as a reference like I do an array. If so how do you dereference it, if you have to at all. Where am I going wrong? sub generate_navIndex{ my ( $paramPath, $paramPageName, $para

Re: can I should I shift/push an array in a foreach loop?

2003-02-11 Thread John W. Krahn
Lance Murray wrote: > > Hello: Hello, > I've been away from the Learning Perl book for a few weeks and trying to refresh > my memory, but I'm stumped. What I need to do is take the output of a command > (ovfiltercheck) that looks something like this: > > ### BIN OUTPUT BEGIN ##

Re: Fixed length variable

2003-02-11 Thread John W. Krahn
Fred Sahakian wrote: > > I have data that prints to a flat file database. > The data can sometimes be 1, 2, 3, or 4 characters in length. > Id like to have it print a fixed length (6 characters) into the database, like this: > > xyz|fred |xyz > > instead of > > xyz|fred|xyz > > Is there a sim

RE: How to Add spaces at the end of a line

2003-02-11 Thread david
Madhu Reddy wrote: > $_ will have newline char.. > ' '(2 spaces) added after the new line char (\n) > i want to add before newline char... > i don't want to chomp the newline char > i want new line char should be there again.. > > how to do this ? try: #!/usr/bin/perl -w use strict;

RE: How to Add spaces at the end of a line

2003-02-11 Thread Madhu Reddy
> > > > while() { > >if (length($_) == 263) { > > Add 2 spaces to the end (before new line > char) > > of $_ > > $_ .= ' '; > # or > $_ .= ' ' x 2; > > > >} > > } > > > > How to do this ? $_ will have newline char.. ' '(2 spaces) added after the new

Re: Passing an array to a subroutine

2003-02-11 Thread John W. Krahn
Colin Johnstone wrote: > > Gidday All, Hello, > A couple of you helped me with this before but I have misplaced my notes I am > trying to pass an array to a subroutine and am having trouble. > > As i am passing other variables as well I know I need to pass it by reference. > Am I doing it corre

Re: Help getting scripts working...

2003-02-11 Thread Wiggins d'Anconia
You may want to have a look at Net::Ping, but that isn't what you asked Mark VanMiddlesworth wrote: this is a script that systematically pings every host on the network, and writes the output to the screen. If the -n arg is specified, it will also write to a disk. What's wrong with the synt

RE: How to Add spaces at the end of a line

2003-02-11 Thread Toby Stuart
> -Original Message- > From: Madhu Reddy [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, February 12, 2003 11:21 AM > To: [EMAIL PROTECTED] > Subject: How to Add spaces at the end of a line > > > Hi, >I want to do some data validation... > I hvae to read each (row)line in a file and h

Help getting scripts working...

2003-02-11 Thread Mark VanMiddlesworth
this is a script that systematically pings every host on the network, and writes the output to the screen. If the -n arg is specified, it will also write to a disk. What's wrong with the syntax, especially line 12? #!/usr/bin/env perl $x = 1; $b = 0; for ($x = 1; $x < 256; $x++) {

How to Add spaces at the end of a line

2003-02-11 Thread Madhu Reddy
Hi, I want to do some data validation... I hvae to read each (row)line in a file and have to check the length of each row, if length of row is 263 I need to add 2 spaces at the end of line (row) to make 265 row lenghth .. Here how to add spaces at the end of length while() { if (length($_)

Re: how to sort a big file

2003-02-11 Thread david
Madhu Reddy wrote: > Hi, > I want to sort a file and want to write the result > to same file > I want to sort a based on 3rd column.. > > following is my file format > > C1 C2 C3 C4 > 1234 guhr 89890 uierfer > 1324 guii 60977 hiofver > 5467 frwf 56576 err > > > i want to so

Re: can I should I shift/push an array in a foreach loop?

2003-02-11 Thread simran
>> Re: can I should I shift/push an array in a foreach loop? not a very good idea... try using the while structure instead if you need to do so... On Wed, 2003-02-12 at 10:23, Lance Murray wrote: > Hello: > > I've been away from the Learning Perl book for a few weeks and trying to refresh >

Re: Command Line Modules

2003-02-11 Thread Jeff Westman
--- Paul Johnson <[EMAIL PROTECTED]> wrote: > On Tue, Feb 11, 2003 at 09:45:32AM -0800, Jeff Westman wrote: > > > This seems simple enough, but I can't get it to work. > > > > I want to print out the cross-reference AND parsed version of a script. > I > > can only get one of the modules at a ti

Re: incrementing inside a s///

2003-02-11 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > David Gilden wrote: > > > > How do get $i do increment inside the substitution below? > > > > #!/usr/bin/perl -w > > > > my $i = 0; > > > > while(<>) > > { > > chomp; > > s/name=\"order/name=\"order$i++/; > > print "$_\n"; > > } > > Another way to d

RE: HTML::TokeParser

2003-02-11 Thread Dan Muey
Funny, here's the script since I modified it perhaps I jacked somehting up Also I had it checking meta tags :: my $name = $token->[1]{name} || "-"; my $http = $token->[1]{http-equiv} || "-"; my $cont = $token->[1]{content} || "-"; That would grab content for all of them, The name if it was a nam

can I should I shift/push an array in a foreach loop?

2003-02-11 Thread Lance Murray
Hello: I've been away from the Learning Perl book for a few weeks and trying to refresh my memory, but I'm stumped. What I need to do is take the output of a command (ovfiltercheck) that looks something like this: ### BIN OUTPUT BEGIN # FilterExpressions { NetBackbone "Netw

No recipient addresses found in header

2003-02-11 Thread Damian Wader
I wrote a cgi program in perl that is sent out in the form of an HTML email. This email goes to opt-in clients of mine. Click Here to see the email In the above HTML code the variables, "" and " are not perl code but variables that are replaced by the names and email address's of those of my clie

Re: incrementing inside a s///

2003-02-11 Thread John W. Krahn
David Gilden wrote: > > How do get $i do increment inside the substitution below? > > #!/usr/bin/perl -w > > my $i = 0; > > while(<>) > { > chomp; > s/name=\"order/name=\"order$i++/; > print "$_\n"; > } Another way to do it: s/name="order/name="order@{[$i++]}/; John -- use Perl; program f

RE: HTML::TokeParser

2003-02-11 Thread david
Dan Muey wrote: > > It won't grab/parse img tags that are between tags, IE an image that > is a link. I tried having it parse 's first then 's but that > didn't work. Any thoughts?? > Thanks for all you r help! > what do you mean? the following seems to be working: #!/usr/bin/perl -w use stric

installing Crypt::Twofish error

2003-02-11 Thread Patricia Hinman
I'm not having much luck so far installing encryption modules. I'm on a win98 box with perl 5.8 and have tried to install Crypt::Serpent and Crypt::Twofish. When I run makefile.pl for Twofish it reports : Searching for uint*_t ... specified COMMAND Search directory bad. This is suppose to be o

how to sort a big file

2003-02-11 Thread Madhu Reddy
Hi, I want to sort a file and want to write the result to same file I want to sort a based on 3rd column.. following is my file format C1 C2 C3 C4 1234 guhr 89890 uierfer 1324 guii 60977 hiofver 5467 frwf 56576 err i want to sort above file based on column 3(C3) and i want t

RE: HTML::TokeParser

2003-02-11 Thread Dan Muey
> Dan Muey wrote: > > > > >> > >> I am trying to use HTML::TokeParser > >> From the cpan page for this I used this example : > >> > >> while (my $token = $p->get_tag("a")) { > >> my $url = $token->[1]{href} || "-"; > >> my $text

RE: Passing an array to a subroutine

2003-02-11 Thread Hanson, Rob
I think you forgot to dereference it... $pageContent = format_indexPage( \@picDetails, 0 ); sub format_indexPage{ my ( $paramArrayPicDetails, $paramIndexPageId ) = @_; --> my @paramArrayPicDetails = @{$paramArrayPicDetails}; ... $numElements = scalar( @paramArrayPicDetails ); Rob

Re: very novice "date" question

2003-02-11 Thread Zeus Odin
> I am trying to extract last month's date from today's date as in "Jan" > or "Feb"is there a switch to enable that ? Assuming you actually meant "extract last month's name based on today's date": @months = qw(Jan Feb Mar Apr May Jun July Aug Sep Oct Nov Dec); print $months[(localtime)[4]-1];

Passing an array to a subroutine

2003-02-11 Thread Johnstone, Colin
Gidday All, A couple of you helped me with this before but I have misplaced my notes I am trying to pass an array to a subroutine and am having trouble. As i am passing other variables as well I know I need to pass it by reference. Am I doing it correctly. $pageContent = format_indexPage( \

Re: Command Line Modules

2003-02-11 Thread Paul Johnson
On Tue, Feb 11, 2003 at 09:45:32AM -0800, Jeff Westman wrote: > This seems simple enough, but I can't get it to work. > > I want to print out the cross-reference AND parsed version of a script. I > can only get one of the modules at a time to work -- not both. > > I have tried: > > perl -Mmodu

Re: incrementing inside a s///

2003-02-11 Thread Rob Dixon
Rob Dixon wrote: > David Gilden wrote: >> How do get $i do increment inside the substitution below? >> Thanks >> Dave >> >> #!/usr/bin/perl -w >> >> my $i = 0; >> >> while(<>) { >> chomp; >> s/name=\"order/name=\"order$i++/; >> print "$_\n"; >> } > > Hi David. > > You can use the /e (f

RE: Fixed length variable

2003-02-11 Thread wiggins
On Tue, 11 Feb 2003 15:57:18 -0500, "Fred Sahakian" <[EMAIL PROTECTED]> wrote: > I have data that prints to a flat file database. > > The data can sometimes be 1, 2, 3, or 4 characters in length. > > Id like to have it print a fixed length (6 ch

RE: installing Crypt::Serpent ?

2003-02-11 Thread wiggins
On Tue, 11 Feb 2003 11:56:39 -0800 (PST), Patricia Hinman <[EMAIL PROTECTED]> wrote: > I want to learn about encryption. I've browsed CPAN > and thought I would give this a try: > > http://search.cpan.org/author/JHUGHES/Crypt-Serpent-1.01/ > > I

Re: Fixed length variable

2003-02-11 Thread Jenda Krynicky
From: "Fred Sahakian" <[EMAIL PROTECTED]> > I have data that prints to a flat file database. > > The data can sometimes be 1, 2, 3, or 4 characters in length. > > Id like to have it print a fixed length (6 characters) into the > database, like this: > > xyz|fred |xyz > > instead of > > xy

Re: incrementing inside a s///

2003-02-11 Thread Rob Dixon
David Gilden wrote: > How do get $i do increment inside the substitution below? > Thanks > Dave > > #!/usr/bin/perl -w > > my $i = 0; > > while(<>) { > chomp; > s/name=\"order/name=\"order$i++/; > print "$_\n"; > } Hi David. You can use the /e (for Expression) modifier on the substit

Re: incrementing inside a s///

2003-02-11 Thread Jenda Krynicky
From: David Gilden <[EMAIL PROTECTED]> > How do get $i do increment inside the substitution below? > Thanks > Dave > > #!/usr/bin/perl -w > > my $i = 0; > > while(<>) > { > chomp; > s/name=\"order/name=\"order$i++/; > print "$_\n"; > > } You have to tell Perl to treat the replacement as Perl

Fixed length variable

2003-02-11 Thread Fred Sahakian
I have data that prints to a flat file database. The data can sometimes be 1, 2, 3, or 4 characters in length. Id like to have it print a fixed length (6 characters) into the database, like this: xyz|fred |xyz instead of xyz|fred|xyz Is there a simple solution? I was going to count

Re: HTML::TokeParser

2003-02-11 Thread Rob Dixon
Dan Muey wrote: >> I am trying to use HTML::TokeParser >> From the cpan page for this I used this example : >> >> while (my $token = $p->get_tag("a")) { >> my $url = $token->[1]{href} || "-"; >> my $text = $p->get_trimmed_text("/a"); >

RE: inner variable access

2003-02-11 Thread Bob Showalter
Bob Showalter wrote: > ... > But foreach loops are funny. Try this: > > use strict; > > our $x = "Hello"; Aargh! That should be "my". To much confusion in my cutting/pasting. > > printx(); > for $x (1..3) { >print "$x\n"; >printx(); > } > printx(); > > sub printx { print "$x\n"; } >

incrementing inside a s///

2003-02-11 Thread David Gilden
How do get $i do increment inside the substitution below? Thanks Dave #!/usr/bin/perl -w my $i = 0; while(<>) { chomp; s/name=\"order/name=\"order$i++/; print "$_\n"; } == Cora Connection: Your West African Music Source

installing Crypt::Serpent ?

2003-02-11 Thread Patricia Hinman
I want to learn about encryption. I've browsed CPAN and thought I would give this a try: http://search.cpan.org/author/JHUGHES/Crypt-Serpent-1.01/ I used CPAN to install it and my perl version is 5.8 for win32. A little script I wrote couldn't find the module so I proceeded to install it with

RE: HTML::TokeParser

2003-02-11 Thread david
Dan Muey wrote: > >> >> I am trying to use HTML::TokeParser >> From the cpan page for this I used this example : >> >> while (my $token = $p->get_tag("a")) { >> my $url = $token->[1]{href} || "-"; >> my $text = $p->get_trimmed_tex

Re: inner variable access

2003-02-11 Thread Jenda Krynicky
To: [EMAIL PROTECTED] From: "Lance" <[EMAIL PROTECTED]> Subject:inner variable access Date sent: Tue, 11 Feb 2003 17:49:25 - > Is there a way to access the 'foreach' variable from a subprocedure > called from inside the loop wh

RE: HTML::TokeParser

2003-02-11 Thread Dan Muey
> > I am trying to use HTML::TokeParser > From the cpan page for this I used this example : > > while (my $token = $p->get_tag("a")) { > my $url = $token->[1]{href} || "-"; > my $text = $p->get_trimmed_text("/a"); >

RE: inner variable access

2003-02-11 Thread Bob Showalter
Rob Dixon wrote: > Lance wrote: > > Is there a way to access the 'foreach' variable from a subprocedure > > called from inside the loop whose variable you want to access? > > Hooboy, even I don't understand that question! ;-) An example is > > neccessary, I believe: > > > >foreach my

HTML::TokeParser

2003-02-11 Thread Dan Muey
I am trying to use HTML::TokeParser >From the cpan page for this I used this example : while (my $token = $p->get_tag("a")) { my $url = $token->[1]{href} || "-"; my $text = $p->get_trimmed_text("/a"); print "$

Re: inner variable access

2003-02-11 Thread Rob Dixon
Lance wrote: > Is there a way to access the 'foreach' variable from a subprocedure > called from inside the loop whose variable you want to access? > Hooboy, even I don't understand that question! ;-) An example is > neccessary, I believe: > >foreach my $store( values %$server ){ >

Newbie question

2003-02-11 Thread Steve Lobach
I've been doing some work on AIX and using grep to find data in files, but I frequently run into situations where the lines are much longer than 2k characters. I found a nice tool using Perl to do this.. Now I would like to beef up this script a little bit.. How can I run that Perl script re

RE: RE: browser reload

2003-02-11 Thread Dan Muey
Not just security. Lots of other reasons too Go to google.com and search for CGI.pm vs cgi-lib.pl > > thanks! > > what type of security does the CGI module include that > cgi-lib doesn't have? > > >>> "Dan Muey" <[EMAIL PROTECTED]> 02/11/03 06:30 AM >>> > Because you call log_data() everyt t

Re: finding rows in a large file (22 millions of rows)

2003-02-11 Thread david
Madhu Reddy wrote: > C1 C2 C3 C4 > > 12345 efghij klmno pqrs > 34567 abnerv oiuuy uyrv > 94567 abnerv gtuuy hyrv > 12345 aswrfr rtyyt erer > 94567 abnerv gtuuy hyrv > > > Here row1 and row4 are duplicates...those needs > to be removed or moved to anothe

Command Line Modules

2003-02-11 Thread Jeff Westman
This seems simple enough, but I can't get it to work. I want to print out the cross-reference AND parsed version of a script. I can only get one of the modules at a time to work -- not both. I have tried: perl -Mmodule=Xref,Deparse myscript.pl perl -MO=Xref,-MO=Deparse myscript.pl perl -m modul

inner variable access

2003-02-11 Thread Lance
Is there a way to access the 'foreach' variable from a subprocedure called from inside the loop whose variable you want to access? Hooboy, even I don't understand that question! ;-) An example is neccessary, I believe: foreach my $store( values %$server ){ if( $$store{

Re: RE: browser reload

2003-02-11 Thread Pam Derks
thanks! what type of security does the CGI module include that cgi-lib doesn't have? >>> "Dan Muey" <[EMAIL PROTECTED]> 02/11/03 06:30 AM >>> Because you call log_data() everyt time the script is run regardless of input So it will write do log_data when you first bring up the form because $in{'Su

RE: if exists with array

2003-02-11 Thread Kipp, James
> > Unless the arrays become too big, > > grep is your friend > > (perldoc -f grep) > > According to the FAQ I mentioned in another reply, it isn't ;-) yep, i spoke to soon as well. grep has always worked well for me. so there is the quick and dirty way, then the right way :) from the faq: Ple

RE: if exists with array

2003-02-11 Thread Kipp, James
> if(exists $hash{$key}) { ... } > > is there a way to do that with arrays? > IE > if there is an array element that is 'bob' then do this :: > without having to do a foreach on the array > > basically an easier/better/faster/ way to do this : > > @search_for_these = > @search_me =

Re: if exists with array

2003-02-11 Thread Felix Geerinckx
on di, 11 feb 2003 15:54:36 GMT, Janek Schleicher wrote: > On Tue, 11 Feb 2003 11:22:20 -0600, Dan Muey wrote: > >> is there a way to do that with arrays? >> IE >> if there is an array element that is 'bob' then do this :: >> without having to do a foreach on the array > > Unless the arrays beco

Re: Formatting Variables.

2003-02-11 Thread Janek Schleicher
On Tue, 11 Feb 2003 08:06:33 -0600, Rgíón «hávkú wrote: > Is there a way to give format to a Variable. perldoc -f printf > I mean, if I don't want to get printed 3.1415926535 (Or any irrational > number) but something like 3.14, is there a way to use format?? perl -e 'printf "%1.2f", 3.14159265

Re: if exists with array

2003-02-11 Thread Felix Geerinckx
on di, 11 feb 2003 17:22:20 GMT, Dan Muey wrote: > if(exists $hash{$key}) { ... } > > is there a way to do that with arrays? > IE > if there is an array element that is 'bob' then do this :: > without having to do a foreach on the array See perldoc -q "array contains" in the Frequently

Re: if exists with array

2003-02-11 Thread Janek Schleicher
On Tue, 11 Feb 2003 11:22:20 -0600, Dan Muey wrote: > is there a way to do that with arrays? > IE > if there is an array element that is 'bob' then do this :: > without having to do a foreach on the array Unless the arrays become too big, grep is your friend (perldoc -f grep) If they become too

if exists with array

2003-02-11 Thread Dan Muey
Withh a hash you can do if(exists $hash{$key}) { ... } is there a way to do that with arrays? IE if there is an array element that is 'bob' then do this :: without having to do a foreach on the array basically an easier/better/faster/ way to do this : @search_for_these = @search_me =

RE: Formatting Variables.

2003-02-11 Thread Westgate, Jared
Ramón Chávez wrote: > I mean, if I don't want to get printed 3.1415926535 (Or any irrational > number) but something like 3.14, is there a way to use format?? I agree with the other posts. Use printf. Here is some more reading, to check out: perldoc -q "long decimals" perldoc -q "round" Hope t

RE: finding rows in a large file (22 millions of rows)

2003-02-11 Thread Westgate, Jared
Madhu Reddy Wrote: > We are trying to load date into teradata [which is > data warehousing, stores Terabytes of data, and which > is 10 times faster than any other database..) Data warehousing is always an exciting subject! However, I'd be surprised to see this kind of performance increase. A

Re: Finding Duplicates.

2003-02-11 Thread Rob Dixon
Paul Kraus wrote: > I have to find duplicate customers in are customer file (around 60,000 > customers). > The file has been exported into a pipe delimited file. > > CustCode|Ship2Code|Name|Addr1|Addr2|City|State|ZipCode|Phone|Fax|Country > > Normally this task is done by printing it and someone go

RE: Finding Duplicates.

2003-02-11 Thread Kipp, James
> Custcode+ship2 would be unique. > > Searching just on the name wouldn't help because a lot of these > companies are fly by night and are bought and sold routinely so the > names change frequently. Ok, so we you to find dups on any field? The mispellings is going to make this tough! There are

RE: Finding Duplicates.

2003-02-11 Thread Paul Kraus
The system is already running on a relational database. Its running tbred solution 4 for UNIX. It’s a very old system that lacks a lot of the flexibility of newer databases such as oracle. However the system highly customizable so its not worth the effort to upgrade. I have been using Perl to "bui

RE: Finding Duplicates.

2003-02-11 Thread Kipp, James
> > > > So you are looking for duplicates on any field? Wouldn't you > > just be looking for a dup on the Name? Shouldn't the CustCode > > field be unique? > > Has your company thought about importing these files into a > > relational database. Would be much faster and easier. > > This will n

RE: Finding Duplicates.

2003-02-11 Thread Paul Kraus
Custcode+ship2 would be unique. Searching just on the name wouldn't help because a lot of these companies are fly by night and are bought and sold routinely so the names change frequently. A relational database would be a lot easier however it would not expand my understanding of Perl :) -O

RE: Finding Duplicates.

2003-02-11 Thread NYIMI Jose (BMB)
> -Original Message- > From: Kipp, James [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 11, 2003 4:25 PM > To: '[EMAIL PROTECTED]'; 'Perl' > Subject: RE: Finding Duplicates. > > > > I have to find duplicate customers in are customer file > (around 60,000 > > customers). The file

RE: Finding Duplicates.

2003-02-11 Thread Kipp, James
> I have to find duplicate customers in are customer file (around 60,000 > customers). > The file has been exported into a pipe delimited file. > > CustCode|Ship2Code|Name|Addr1|Addr2|City|State|ZipCode|Phone|F > ax|Country > The problem is the duplicates can be misspelled meaning you can't just

Finding Duplicates.

2003-02-11 Thread Paul Kraus
I have to find duplicate customers in are customer file (around 60,000 customers). The file has been exported into a pipe delimited file. CustCode|Ship2Code|Name|Addr1|Addr2|City|State|ZipCode|Phone|Fax|Country Normally this task is done by printing it and someone going through it manually to fin

RE: Formatting Variables.

2003-02-11 Thread Ramón Chávez
Thank you everyone. sprintf is what I was looking for. -rm- - Original Message - From: <[EMAIL PROTECTED]> To: 'Ramón_Chávez' <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 8:30 AM Subject: RE: Formatting Variables. > See also 'sprintf' if you don't want to

Re: very novice "date" question

2003-02-11 Thread Rob Dixon
Sam Harris wrote: > I am trying to extract last month's date from today's date as in > "Jan" or "Feb"is there a switch to enable that ? Not a 'switch'. I'm not sure what you had in mind. You can get the current local date/time by calling 'localtime'. In array context, this function returns a

Re: very novice "date" question

2003-02-11 Thread Stefan Lidman
Sam Harris wrote: > > I am trying to extract last month's date from today's date as in "Jan" or >"Feb"is there a switch to enable that ? Well im not sure what you want. $ perl -we 'print join " ", localtime , "\n" ' 27 24 15 11 1 103 2 41 0 $ perl -we 'print scalar localtime , "\n" ' Tue

RE: browser reload

2003-02-11 Thread Dan Muey
Because you call log_data() everyt time the script is run regardless of input So it will write do log_data when you first bring up the form because $in{'Submit'} will always not equal 'Submit' Until the user does soemthing to make it equal 'Submit' 1) You should check input always 2) always d

RE: one line creat and write to file?

2003-02-11 Thread Dan Muey
Sweet thanks! > On Mon, 10 Feb 2003 12:32:16 -0600, Dan Muey wrote: > > > I'm tryin got find the quickest way to creat a file and write to it. > > > > I know I can do > > open > > print FILEHANDLE $stuff; > > close... > > and perhaps ad some flocks for good measure > > > > what I'm won

RE: Formatting Variables.

2003-02-11 Thread wiggins
See also 'sprintf' if you don't want to print the value, but assign it: perldoc -f sprintf perldoc -f printf http://danconia.org On Tue, 11 Feb 2003 09:09:55 -0500, Ken Lehman <[EMAIL PROTECTED]> wrote: > Have you tried using printf? > > -O

Re: readline() on closed filehandle FILE

2003-02-11 Thread John W. Krahn
Nandita Mullapudi wrote: > > Hi all, Hello, > am using the following script to parse a long list of files. funnily > enough, it works fine when i try a couple sample files, but when i'm > using a long list of files, it comes up with this error: > > readline() on closed filehandle FILE at hashin

RE: Formatting Variables.

2003-02-11 Thread Ken Lehman
Have you tried using printf? -Original Message- From: Ramón Chávez [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 11, 2003 9:07 AM To: [EMAIL PROTECTED] Subject: Formatting Variables. Hello boys and girls. Is there a way to give format to a Variable. I mean, if I don't want to get

Formatting Variables.

2003-02-11 Thread Ramón Chávez
Hello boys and girls. Is there a way to give format to a Variable. I mean, if I don't want to get printed 3.1415926535 (Or any irrational number) but something like 3.14, is there a way to use format?? Or I need to make some string treating (more lines)?? Thank you everyone. -rm- -- To unsu

Re: what to call my module

2003-02-11 Thread Jenda Krynicky
From: Paul Tremblay <[EMAIL PROTECTED]> > I have a series of modules in a directory that I will call Rtf2xml. (I > checked on Cpan, and don't believe this name space is taken.) > > I named each module by a simple name--for example Pict.pm. In the main > script, I have: > > use Rtf2xml::Pict > ...

very novice "date" question

2003-02-11 Thread Sam Harris
I am trying to extract last month's date from today's date as in "Jan" or "Feb"is there a switch to enable that ? Thanks Sam Harris, Internet Services Franklin University 201 S. Grant Avenue Columbus, Ohio 43215-5399 Work: (614)-744-8322 Toll free: 1-877-341-6300 ext. 8322 [EMAIL PROTECTED

Re: Workaround needed for epoch time truncation with gmtime

2003-02-11 Thread Felix Geerinckx
on Tue, 11 Feb 2003 00:31:22 GMT, [EMAIL PROTECTED] (Chris) wrote: > Nice. Do you know a hack? I am limited to a small perl 5.6.1 > distro. The hack you are looking for can be found in the source code of the Date::Manip module. -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Re: web server 500 error

2003-02-11 Thread Felix Geerinckx
on Tue, 11 Feb 2003 06:59:53 GMT, [EMAIL PROTECTED] (Samuel Mauntz) wrote: > the error log on the web server spits out this line every time I > try to access my script via a browser > > 63.201.89.246 - - [11/Feb/2003:00:42:48 -0600] "GET > /cgi-bin/schedule.pl HTTP/1.1" 500 546 That line is not

Re: how to debug this error message: a thoughf one

2003-02-11 Thread Rob Dixon
Kasi ramanathen wrote: > hi friends, > > i use useragent to get some web page and store it in htm. i use > useragent module. when i run in my windows machine i get the desired > output. now the mecine is changed now also windows, when i run i get > the error message > > "can't locate LWP/UserAgent.

Re: readline() on closed filehandle FILE

2003-02-11 Thread Rob Dixon
Nandita Mullapudi wrote: > Hi all, > am using the following script to parse a long list of files. funnily > enough, it works fine when i try a couple sample files, but when i'm > using a long list of files, it comes up with this error: > > readline() on closed filehandle FILE at hashing22.pl line 2

Re: web server 500 error

2003-02-11 Thread Samuel Mauntz
Here's what my modified code looks like right now, I've taken anything out that I thought might cause trouble with the server, and just did some basic prints. - #!/usr/bin/perl print "Content-type:

Focing a page break using format statements

2003-02-11 Thread Maureen E Fischer
Hi, I am outputting a report and using format statements to do it. Whenever the client changes I want to do a page break, initialize the page numbers at 1, and write the top of page format. While my code is writing out the top of page format and assigning the correct page numbe

was re readline() on closed filehandle FILE

2003-02-11 Thread Nandita Mullapudi
i just found the problem- bad formatting of filenames in my list of files.. thanks! -nandita -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

browser reload

2003-02-11 Thread Pam Derks
Hi all, I have a cgi with a here doc, which takes the input fields (name, address, city, zip, etc.) and writes to a file. it work fine, BUT when you press "Reload" on the browser it keeps writing blank data to the output file. Does anyone know how I can prevent this? thanks for any help, Pam

readline() on closed filehandle FILE

2003-02-11 Thread Nandita Mullapudi
Hi all, am using the following script to parse a long list of files. funnily enough, it works fine when i try a couple sample files, but when i'm using a long list of files, it comes up with this error: readline() on closed filehandle FILE at hashing22.pl line 29, line 13 (#1) (W closed) The