File not Opening.....why?

2001-07-24 Thread Rahul Garg
Hello Everybody, One of the files is not opening.Couldnt get WHY...possibly U CAN..HELP NOTE : the same program i am running independently on telnet with command line arguments , is running perfectlybut thru browser its not working..the problem its giving

Re: output file for download

2001-07-24 Thread Rachel Coleman
> >you just need to provide a link to your file. > >simply,click here to download my file > >and the browser,itself will automatically bring that dialog box, > >whenever user clicks on "Click here to download my file". > > I would like to create the file dynamically with a cgi program and send it

Re: Running Perl scripts...

2001-07-24 Thread Jeff 'japhy/Marillion' Pinyan
On Jul 25, Jeff 'japhy/Marillion' Pinyan said: >On Jul 25, Daniel Falkenberg said: > >>I want to be able to check for errors on my Linux box before I run them >>in a browser. The problem is is tha when I do this all my HTML is >>dispalyed. I don't want to see this I want to be able to just chec

Re: Running Perl scripts...

2001-07-24 Thread Jeff 'japhy/Marillion' Pinyan
On Jul 25, Daniel Falkenberg said: >I want to be able to check for errors on my Linux box before I run them >in a browser. The problem is is tha when I do this all my HTML is >dispalyed. I don't want to see this I want to be able to just check for >any errors and display the errors only. > >pri

File not Opening.....why?

2001-07-24 Thread Rahul Garg
Hello Everybody, One of the files is not opening.Couldnt get WHY...possibly U CAN..HELP the code goes like this : # !usr/bin/perl -w use CGI; $query =new CGI ; print <<"Endoftext"; Content-type: text/html Endoftext # fine till here

Re: No "make", "nmake", or "dmake" in build 628 of ActivePerl for Win32?

2001-07-24 Thread Daniel Dwyer
"Bob Abugov" <[EMAIL PROTECTED]> wrote: > Hi, I'm trying to build modules on a Win2K system using the Perl make >command. What do I need to do? When I try to use it after building a >Makefile, Perl can't seem to find here's what I get: > Use activestates PPM. Read more about it here. http://aspn

Running Perl scripts...

2001-07-24 Thread Daniel Falkenberg
List, I want to be able to check for errors on my Linux box before I run them in a browser. The problem is is tha when I do this all my HTML is dispalyed. I don't want to see this I want to be able to just check for any errors and display the errors only. Can I run them with out print what is

OT - PostgreSQL

2001-07-24 Thread Daniel Falkenberg
List, Can some one please tell me how I would go about sorting a column using PostgreSQL. I have a columnn that contains four entries... 1 - PENDING 2 - INCOMPLETE 3 - COMPLETE 4 - DELETED I need to sort this column by first DELETED --> then INCOMPLETE --> then COMPLETE --> then DELETED Any id

OT - PostgreSQL

2001-07-24 Thread Daniel Falkenberg
List, Can some one please tell me how I would go about sorting a column using PostgreSQL. I have a columnn that contains four entries... 1 - PENDING 2 - INCOMPLETE 3 - COMPLETE 4 - DELETED I need to sort this column by first DELETED --> then INCOMPLETE --> then COMPLETE --> then DELETED Any id

Re: I have an array ... @effort

2001-07-24 Thread Michael Fowler
On Tue, Jul 24, 2001 at 05:15:35PM -0500, [EMAIL PROTECTED] wrote: > > I have an array ... @effort. I want to match the first instance > of /AbC/ in @effort and push that element into a new array > @newarray. > > Immediately after that, I want to match the first instance of > /ZyX[andall13ch

RE: I have an array ... @effort

2001-07-24 Thread innovative-peripherals
On 24 Jul 2001, at 15:35, Wagner-David wrote: > Do you have what data looks like or some code? It is unclear to me > what you are doing with the ZyX test. > > Wags ;) I'm hoping to match /ZyX/ once only push it into @newarray. Then repeat: match /AbC/; match /ZyX/ once only ... Then repeat: mat

RE: UNIX install of Term::ReadKey errors

2001-07-24 Thread Steve Howard
Someone may be equipped to answer this on this list, but if not, I'm sure you could get it answered on the DBI users group. I haven't seen this post on that list, have you tried them? Steve H. -Original Message- From: Webster, Murray [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 200

UNIX install of Term::ReadKey errors

2001-07-24 Thread Webster, Murray
Folks, sorry if this isn't really where I should be asking this. I've successfully installed DBI, DBD::Oracle and Term::ReadKey using ppm on my NT4 workstation. They all work as advertised :) However, I now want to install onto a UNIX (Solaris 2.6) box. When I try to install Term::Read

Re: regex problem

2001-07-24 Thread Paul
--- Neema Salimi <[EMAIL PROTECTED]> wrote: I know you've already solved this on your own, but just a small note: > if ($_ =~ /CA\s*ARG\s*1\s*(-*\d+\.\d+)\s*(-*\d+\.\d+)\s*(-*\d+\.\d+)/ the $_ =~ is unnecessary. The match operator defaults to matching $_, so saying /foo/ is exactly equiv

RE: regex problem

2001-07-24 Thread Neema Salimi
Left off a damn parenthesis, it's been a long day. Sorry. Neema Salimi [EMAIL PROTECTED]

regex problem

2001-07-24 Thread Neema Salimi
Syntax error on this; please help (unnecessary lines omitted). String looked for is: CA ARG 1 (then 3 numbers,can be negative, always have a decimal and digits after decimal) while () { if ($_ =~ /CA\s*ARG\s*1\s*(-*\d+\.\d+)\s*(-*\d+\.\d+)\s*(-*\d+\.\d+)/ { print "$1 $2 $3 \n"

RE: I have an array ... @effort

2001-07-24 Thread Wagner-David
Do you have what data looks like or some code? It is unclear to me what you are doing with the ZyX test. Wags ;) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 15:16 To: [EMAIL PROTECTED] Subject: I have an array ... @effort

I have an array ... @effort

2001-07-24 Thread innovative-peripherals
I have an array ... @effort. I want to match the first instance of /AbC/ in @effort and push that element into a new array @newarray. Immediately after that, I want to match the first instance of /ZyX[andall13charactersfollowingZyX]{anddontmatchanymoreZyX}/ in @effort and push that element i

Re: output file for download

2001-07-24 Thread Tim Keefer
I would like to create the file dynamically with a cgi program and send it to the browser rather than placing an href to a static file. This may not even be possible, but it would simplify things on my end. At 04:40 PM 7/24/2001, you wrote: >you just need to provide a link to your file. >simp

RE: basename ?

2001-07-24 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 24, 2001 5:33 PM > To: [EMAIL PROTECTED] > Subject: RE: basename ? > > > Why add another module when one regexp can do it? ;) The module does allow you to deal with non-Unix systems where th

RE: basename ?

2001-07-24 Thread jbarry
Why add another module when one regexp can do it? ;) -Original Message- From: Mel Matsuoka [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 5:17 AM To: [EMAIL PROTECTED] Subject: RE: basename ? At 01:48 PM 07/24/2001 -0500, Mooney Christophe-CMOONEY1 wrote: >Why not just use a r

RE: Cleanest way to split this

2001-07-24 Thread jbarry
There's also the procedure in Mastering Regular Expressions: (lifted from The Perl Cookbook) [CODE FOLLOWS] sub parse_csv{ my $text = shift; #record containing comma sep values my @new = (); push(@new, $+) while $text =~ m{ #the first part groups the phase

RE: foreach question

2001-07-24 Thread Tom Malone
OK - that clears it up - thanks! Tom -Original Message- From: Mooney Christophe-CMOONEY1 [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 5:03 PM To: Perl List Subject: RE: foreach question It's talking about stuff like this: $_='a,b,c,d,e,f,g,h,i,j,k,l'; foreach $word (split /

RE: foreach question

2001-07-24 Thread Mooney Christophe-CMOONEY1
It's talking about stuff like this: $_='a,b,c,d,e,f,g,h,i,j,k,l'; foreach $word (split /,/) { print $word; } foreach $word (grep /blah/, @somearray) { print $word; } -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: foreach question

2001-07-24 Thread Venkat Mohan
There are some functions that can return arrays and users can write subs that return arrays. Take this example. my $($string, $token); $string = "Tom is not confused any more"; foreach $token (split ' ', $string) { print "$token\n"; } This will return Tom is not confused any more In the

foreach question

2001-07-24 Thread Tom Malone
I am also a newbie, and I'm also currently on Chapter four of O'Reilly's Learning Perl. I just have a simple question about something I just read which confused me... In CH4, in the section on foreach loops, the book says, "If the list you are iterating over is made of real variables rather than

Re: flat file (addendum)

2001-07-24 Thread bc
this was my error, any ideas? "fatals to browser" does not tell much...? compared to my asp/vbScript pages... Software error: couldn't find diagnostic data in /usr/local/lib/perl5/5.6.0/pods/perldiag.pod /usr/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/s

Re: reading a text file

2001-07-24 Thread John Fox
Debbie, Debbie Christensen wrote: > I am able to open the file and read it with no problem. Where I get lost is > My boss wants the data to come out like > 702 OH, PA, ND > 703 NJ, NY, CA There's surely other ways to do this, and many may be better, but here is a solution for you. It makes us

output file for download

2001-07-24 Thread Tim Keefer
hello programmers, I'm trying to output data from a Perl cgi program and would like the browser to open a save dialog box so the user can save the file to disk. I would graciously accept any suggestions Tim -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [E

Re: output of a command to a file

2001-07-24 Thread Abdulaziz Ghuloum
Hello, There is nothing wrong in your perl program. The problem is that not all nic servers produce the same output. The line with "created on" exists for some names only, not all. I tried yahoo.com which had it and netscape.com which didn't have it. So, you should figure out a better way to

RE: basename ?

2001-07-24 Thread Mel Matsuoka
At 01:48 PM 07/24/2001 -0500, Mooney Christophe-CMOONEY1 wrote: >Why not just use a regex? > >($basename)=$file_string=~m!([^/]+)$!; Why not just use File::Basename? ;) Aloha, mel -- mel matsuokaHawaiian Image Productions Chief Executive Alphageek (vox)1.808.5

Re: reading a text file

2001-07-24 Thread Boris Zentner
hi Debbie, perhaps this is what you want. #!/usr/bin/perl -w use strict; open STATES, ") { $num =~ s/^\s+//; $num =~ s/\s+$//; push @{ $states{$num} }, $state; } for (keys %states) { print "$_ ", join ( ',', @{ $states{$_} } ), "\n"; } Am Dienstag, 24. Juli 2001 21:03 schrieb Debbie

RE: output of a command to a file

2001-07-24 Thread Venkat Mohan
This will work. open outfile ">>outfile.txt"; open cmdoutput " $command |"; while() { print outfile; } close cmdoutput; close outfile -Original Message- From: Tyler Longren [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 12:48 PM To: Perl Beginners Subject: output of a comman

RE: output of a command to a file

2001-07-24 Thread Steve Swords
the man page for the open() function has a section on doing exactly what your asking for... -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Problem with scan fields using split

2001-07-24 Thread Abdulaziz Ghuloum
Hello, Please read the documentation that comes with perl about the use of split (perldoc -f split). Remember, split takes a regular expression as the first argument, not a substring. To learn more about regular expressions, perldoc perlre. Read about the usage of "*" and "+". Hope this helps

RE: reading a text file

2001-07-24 Thread Wagner-David
But it is a flame. She stated that she was on chapter 4 and now the boss wants something. Depending on her background(ie, number of years programming ,etc) this can be overwhelming. Yes, she probably could have done more, but if she is truly a newbie, how does she know what to ask or ev

output of a command to a file

2001-07-24 Thread Tyler Longren
Hello everyone, How can I take the output of a command, put into a scalar, and then put it into a file? Here's a portion of what I have: open(FP, ">>$outfile"); my $command = `whois $h | grep 'created on'`; print "$command"; print FP "$h $command\n"; The above code doesn't work though. There's

Re: reading a text file

2001-07-24 Thread Abdulaziz Ghuloum
Hello, This is not a flame. You provided a small program that does nothing but print the file. If you need help, you really should help yourself a little more by first thinking how the program should function. What are the logical steps that need to be performed to achieve what you want. Wh

RE: reading a text file

2001-07-24 Thread Bob Showalter
> -Original Message- > From: Debbie Christensen [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 24, 2001 3:03 PM > To: [EMAIL PROTECTED] > Subject: reading a text file > > > I am brand new to perl; I am only on chapt 4 of the learning > perl book. My boss has already given me a proje

thanks

2001-07-24 Thread Debbie Christensen
I want to thank you all for helping me. The code and information you have given me is going to help me get this project done. Thanks for taking the time to help out a true newbie. Thanks, Debbie Christensen -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EM

Re: reading a text file

2001-07-24 Thread Jos I. Boumans
I love it when i write up complete crap about needing to check existance of keys... the following code will merrily suffice: # open I, "state.txt"; my %codes; while () { chomp; #remove newline s/\s+//g; #remove white space my @entry = split ':'; #split on : pu

RE: reading a text file

2001-07-24 Thread Wagner-David
Here is one way(I changed file to use __DATA__). I sed a hash and then sorted on the data within the hash on the fly. HTH. Wags ;) == #!perl -w my %States = (); while () { chomp

Re: reading a text file

2001-07-24 Thread Jos I. Boumans
I took 2 looks at this problem and figured i'd need to use a hash of array references. now, i'm debating whether i should just hand you the code to get this job done, or whether to realy explain how these things work. i decided to do a bit of both, so bear with me here. what we want is a list o

Re: reading a text file

2001-07-24 Thread Bill Allen
Debbie - You probably want to use references. A situation very similar to yours is covered in one of the perl documentation pages: type "perldoc perlreftut" on your command line. HTH, Bill. On 2001.07.24 12:03 Debbie Christensen wrote: > I am brand new to perl; I am only on chapt 4 of the learn

need help with running Perl under OAS

2001-07-24 Thread AGilbertson
I am a true beginner - just started today. I am running Perl under OAS 4.0's Perl cartridge. They provide a simple example (which works) but no example of connecting to the database via Perl. Can anyone help me? I tried looking at other examples but they are not run under OAS so that may be why

reading a text file

2001-07-24 Thread Debbie Christensen
I am brand new to perl; I am only on chapt 4 of the learning perl book. My boss has already given me a project to do that I am really struggling with. I know you are all really busy, but I would really appreciate any help you can give. I have a text file that looks something like this OH: 702

RE: basename ?

2001-07-24 Thread Mooney Christophe-CMOONEY1
Why not just use a regex? ($basename)=$file_string=~m!([^/]+)$!; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 1:44 PM To: [EMAIL PROTECTED] Subject: Re: basename ? Gary, In article <[EMAIL PROTECTED]>, Gary Stainburn wrote: >The bi

RE: basename ?

2001-07-24 Thread Wagner-David
Here is one using rindex to get what you want: #!perl -w $_ = '15P4aa-U5-00.log:>>> Virus \'W32/Apology-B\' found in file \ /var/spool/exim/qtine/15P4aa-U5-00.exp/qi_test.exe'; my $MyPtr = rindex($_,'/'); my $MyFileName ; if ( $MyPtr < 0 ) { print "No slash found in $_"; }e

Re: basename ?

2001-07-24 Thread John Fox
Gary, In article <[EMAIL PROTECTED]>, Gary Stainburn wrote: >The bit I want to get is: > >qi_test.exe > >What I'm getting is: > >var/spool/exim/qtine/15P4aa-U5-00.exp/qi_test.exe A very simple thing to do here would be to split 'var/spool/exim/qtine/15P4aa-U5-00.exp/qi_test.exe' on '/' c

basename ?

2001-07-24 Thread Gary Stainburn
Hi all, I'm trying to parse a log file generated by a virus scanner so I can extract the basename from a line, but I can't find the basename function in perl. The line I'm getting in is: 15P4aa-U5-00.log:>>> Virus 'W32/Apology-B' found in file \ /var/spool/exim/qtine/15P4aa-U5-00.exp/q

RE: Sort an array of arrays?

2001-07-24 Thread Wagner-David
Here is a reply to an email on another list regarding sorting of array of arrays. Cut and run(I did it on AS 5.6.0 build 623). From this you should be able to do what you want. Wags ;) = P

RE: Problem with scan fields using split

2001-07-24 Thread Bob Showalter
> -Original Message- > From: Marvin Bonilla [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 24, 2001 1:54 PM > To: [EMAIL PROTECTED] > Subject: Problem with scan fields using split > > > Hello > > Certainly I have already new in program with perl , so I need > help with a log scan

RE: Cleanest way to split this

2001-07-24 Thread Wagner-David
Here are some modules( ActiveState ): DBD-CSV [0.1025] DBI driver for CSV files Text-CSV[0.01 ] comma-separated values manipulation routines Text-CSV_XS [0.22 ] comma-separated values manipulation routines XML-CSV [0.10 ] Perl extension converting CSV files to XML

No "make", "nmake", or "dmake" in build 628 of ActivePerl for Win32?

2001-07-24 Thread Bob Abugov
Hi, I'm trying to build modules on a Win2K system using the Perl make command. What do I need to do? When I try to use it after building a Makefile, Perl can't seem to find here's what I get: >perl Makefile.PL Checking for URI ... Checking if your kit is complete ... Looks good Writing Makef

Re: typeglobs and references

2001-07-24 Thread Michael Fowler
On Tue, Jul 24, 2001 at 02:32:18PM -0300, Silvio Luis Leite Santana wrote: > #!/usr/bin/perl -w > use strict; > > our $PI; > > $PI = \3.1415926535; > print "(1) $PI\n"; > # prints SCALAR(0x8101f64) > > $PI = 7; > print "(2) $PI\n"; > # prints 7 > > *PI = \4.31415926; > print "(3) $PI\n"; > # p

Problem with scan fields using split

2001-07-24 Thread Marvin Bonilla
Hello Certainly I have already new in program with perl , so I need help with a log scan program, that extract a field information from a log file and get some fileds in order to use in another program. the log fields looks like this: Jul 24 11:37:59.878 [13001] (v3.1.2) POP login by user "conho

RE: typeglobs and references

2001-07-24 Thread Kipp, James
> > $PI = \3.1415926535; > print "(1) $PI\n"; > # prints SCALAR(0x8101f64) because it is not dereferenced so the value is the memory location. > > $PI = 7; > print "(2) $PI\n"; > # prints 7 like it should > > *PI = \4.31415926; > print "(3) $PI\n"; > # prints 4.31415926\ the typeglob provi

RE: Unix syntax

2001-07-24 Thread Sparkle Williams
The shebang line and everything are correct for the script. The script runs fine when the lines containing "get($ " are commented out. Therefore I'm assuming that the system is reading that combination of ($ as something other than what it should. Any ideas of how I could fix that? >From: "W

Re: passing a value to Perl

2001-07-24 Thread John Fox
Ackim, Ackim Chisha wrote: >In a shell script I can read the value as $1, how do I read it in perl. >In C++ i can read the value using argv[1] , how can I read this same >value in perl, instead of having to have shell script pass it to perl in >form of a file. It's very similar to the C++ me

RE: Cleanest way to split this

2001-07-24 Thread Bob Showalter
> -Original Message- > From: Filip Sneppe (Yucom) [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 24, 2001 1:42 PM > To: [EMAIL PROTECTED] > Subject: Cleanest way to split this > > > Hi, > > I have input lines that look like this: > > username,[EMAIL PROTECTED],age,streetname numbe

RE: passing a value to Perl

2001-07-24 Thread Bob Showalter
> -Original Message- > From: Ackim Chisha [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 24, 2001 1:38 PM > To: [EMAIL PROTECTED] > Subject: passing a value to Perl > > > Hi everybody, > > is there a better way to pass a value from a shell script > rather than write to a file and ha

Re: flat file (addendum)

2001-07-24 Thread Paul
--- Paul <[EMAIL PROTECTED]> wrote: Maybe instead of just > use CGI; you should say use CGI; use CGI::Carp 'fatalsToBrowser'; That'll help you debug. =o) __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Mes

Re: flat file

2001-07-24 Thread bc
thanks bossman! :) will i like this better than asp? - Original Message - From: "Paul" <[EMAIL PROTECTED]> To: "bc" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, July 24, 2001 1:45 PM Subject: Re: flat file > > --- bc <[EMAIL PROTECTED]> wrote: > > i'm a

Cleanest way to split this

2001-07-24 Thread Filip Sneppe \(Yucom\)
Hi, I have input lines that look like this: username,[EMAIL PROTECTED],age,streetname number zip-code city,www.website.com/user/default.html and that need to be split into $username, $email, etc. Easy to do, but some of the records look like this: username,[EMAIL PROTECTED],18,"streetname

Re: flat file

2001-07-24 Thread Paul
--- bc <[EMAIL PROTECTED]> wrote: > i'm an old asp/vbscript dude, i do not know how to "...make sure the > file is open" either? any real quick explanation you can give me to > get the file open in perlScript/CGI? to match what you said below? lol ok: use strict; # option explicit, but bett

passing a value to Perl

2001-07-24 Thread Ackim Chisha
Hi everybody, is there a better way to pass a value from a shell script rather than write to a file and have perl read the file. In a shell script I can read the value as $1, how do I read it in perl. In C++ i can read the value using argv[1] , how can I read this same value in perl, instead

Re: File::Slurp

2001-07-24 Thread Michael Fowler
On Tue, Jul 24, 2001 at 09:25:14AM -0600, Elliott, Don (Police) wrote: > I have noticed that no one giving advice about accessing, reading, writing > files uses the module File::Slurp. I stumbled across it and have been using > it for several months. > To read a file I say my $var = read_file("so

Re: flat file

2001-07-24 Thread bc
i'm an old asp/vbscript dude, i do not know how to "...make sure the file is open" either? any real quick explanation you can give me to get the file open in perlScript/CGI? to match what you said below? > --- bc <[EMAIL PROTECTED]> wrote: > > how, in perl/cgi, or, what is a popular way of conne

Re: interpolation of variables in here documents?

2001-07-24 Thread Michael Fowler
On Tue, Jul 24, 2001 at 02:34:48PM +0100, KAVANAGH, Michael wrote: > print <<"EOF"; > text text text $item{'key'} text text > EOF > > The value from the hash variable $item{'key'} doesn't seem to be > interpolated. It doesn't generate an error though. What string are you seeing printed? What di

typeglobs and references

2001-07-24 Thread Silvio Luis Leite Santana
Hi I have been reading the camel book; it's really fantastic (and funny), but I still didn't understand some topics. One thing that's not so clear is about constants made with typeglobs and references; that's in page 295 of 3rd Ed. I have made the following program to test them: #!/usr/bin/perl -

RE: feasibility check allowed?

2001-07-24 Thread Bob Showalter
> -Original Message- > From: Giridhar nandikotkur [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 24, 2001 12:04 PM > To: Perl Gurus > Subject: feasibility check allowed? > > > Hi anyone > > I had a question about feasibility. I am not sure if > such questions are allowed but any an

Re: Unix syntax

2001-07-24 Thread Michael Fowler
On Tue, Jul 24, 2001 at 08:43:01AM -0400, Sparkle Williams wrote: > I wrote a program running off a Windows NT platform and was trying to > convert it to a UNIX platform. My problem comes with my syntax. I keep > recieving an error message and was hoping someone could help me fix the > syntax s

Re: script headers

2001-07-24 Thread Akshay Arora
also make sure that you are infact printing out a header. use CGI; $cgi = CGI; print $cgi->header; Sally wrote: > > Can anyone give me a general idea what the error premature end of script > headers means? Is it an incorrect filename, or that the file can't be found > or something else? > > --

RE: date help

2001-07-24 Thread Venkat Mohan
This page might help in future. http://www.cpan.org/modules/INSTALL.html If you are using perl in Windows environment try active perl www.activestate.com They have an excellent PPM program which helps a lot. Thanks, Venkat -Original Message- From: Sascha Kersken [mailto:[EMAIL PROTECT

Re: CPAN modules

2001-07-24 Thread John Fox
Donnie, You wrote: >1. Where/how/what is the setting to allow modules built via CPAN build >process to be located such that it is visible to my shell(bash ot tcsh) As far as I know, there is no such setting, and I do not believe one is even necessary, as your login shells have no relationship t

Re: Can PERL do a DIRECT GET?

2001-07-24 Thread John Fox
Bob, In article <[EMAIL PROTECTED]>, Bob Bondi wrote: >In fact what is a DIRECT GET compared to a GET? But, I need to do a DIRECT >GET, for testing IMS stuff in headers. I can't speak for anybody else, but some context would be helpful; I have only the vaguest of ideas of what you might be ta

Re: $ftp_home in Net::FTP

2001-07-24 Thread John Fox
In article <[EMAIL PROTECTED]>, Sparkle Williams wrote: > ...so I was wondering exactly what the value of ftp_home is sup- > -posed to represent. Below is an excerpt from the script. Many > thanks! Nothing magical about that variable name; it could be called anything or it could just as easily be

Re: script headers

2001-07-24 Thread Paul
--- Sally <[EMAIL PROTECTED]> wrote: > Can anyone give me a general idea what the error premature end of > script headers means? Is it an incorrect filename, or that the file > can't be found or something else? Assuming you're talking about the CGI error, it probably means that something in the

Re: how to get date before say 20 days ?

2001-07-24 Thread Jeff 'japhy/Marillion' Pinyan
On Jul 24, shweta shah said: >is there something in perl through which i can get >date previous to some specified days ,say 20 days befores date >i need to know only dd-mm-yy and not time >is there any module function for it Apart from what others have said, you can't JUST take the localtime()

script headers

2001-07-24 Thread Sally
Can anyone give me a general idea what the error premature end of script headers means? Is it an incorrect filename, or that the file can't be found or something else? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: feasibility check allowed?

2001-07-24 Thread Paul
--- Giridhar nandikotkur <[EMAIL PROTECTED]> wrote: > Some archival data is to be retrieved from a > partly-perl based (rest HT??) website passing through > a set of 5-6 screens clicking 3-4 options on each > screen. > after the selection is done a tar file is stored at an > ftp site whose name

feasibility check allowed?

2001-07-24 Thread Giridhar nandikotkur
Hi anyone I had a question about feasibility. I am not sure if such questions are allowed but any answer will be greatly appreciated. problem. Some archival data is to be retrieved from a partly-perl based (rest HT??) website passing through a set of 5-6 screens clicking 3-4 options on each scr

RE: Concatenation

2001-07-24 Thread Will Crain
Use the string concatenation operator . $string = $year."-".$month; HTH Will -- Original Message -- >Hi friends, > Is there a way to concatenate 2 arguments in one string using >Perl like for eg $year and $month where >$year=01 >$month=06 >and I want the result as a string 06-01 using Pe

RE: Unix syntax

2001-07-24 Thread Will Crain
Without seeing the complete script, I can only venture to guess. You stated you were porting a script from WinNT to a Unix environment. Be sure you have properly included a "shebang" line at the beginning of your script like this: #!/usr/bin/perl -w where /usr/bin/perl is the path to your ins

RE: Deleting the contents of file:Help

2001-07-24 Thread Bob Showalter
> -Original Message- > From: Rahul Garg [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 24, 2001 4:44 AM > To: [EMAIL PROTECTED] > Subject: Deleting the contents of file:Help > > I want to search for a specific mailid in a file and if found > then delete that mailid from that file. Do

Re: Extracting data from text files using Perl

2001-07-24 Thread Jos I. Boumans
a snippet of the files would be msot helpfull... - Original Message - From: "Carl Rogers" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 24, 2001 4:51 PM Subject: Extracting data from text files using Perl > Good day; > I have been banging my head against the wall on th

Re: Unix syntax

2001-07-24 Thread M.W. Koskamp
- Original Message - From: Sparkle Williams <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 24, 2001 2:43 PM Subject: Unix syntax > I wrote a program running off a Windows NT platform and was trying to > convert it to a UNIX platform. My problem comes with my syntax. I k

Re: how to get date before say 20 days ?

2001-07-24 Thread Luke Bakken
time() and locatime() functions are all you need, plus you need to figure out the number of seconds in 20 days :-) On Tue, 24 Jul 2001, shweta shah wrote: > hello, > is there something in perl through which i can get > date previous to some specified days ,say 20 days befores date > i need to

File::Slurp

2001-07-24 Thread Elliott, Don (Police)
I was just wondering, I have noticed that no one giving advice about accessing, reading, writing files uses the module File::Slurp. I stumbled across it and have been using it for several months. To read a file I say my $var = read_file("some_file"); To write a file I say write_file("some_file",

Re: Concatenation

2001-07-24 Thread Craig S Monroe
Sure, $date = "$month-$year"; Craig [EMAIL PROTECTED] Pager Numeric: 1-877-895-3558 Email pager: [EMAIL PROTECTED] -- You will never find time for anything. If you want time, you must make it. Charles Buxton - Original Message --

Extracting data from text files using Perl

2001-07-24 Thread Carl Rogers
Good day; I have been banging my head against the wall on this problem for a while and am hoping someone out there may have a resource (web site, book, etc) that can help me figure this puppy out... I have been given a couple text files that looks like it pulled names, addresses and phone numb

RE: Concatenation

2001-07-24 Thread Mooney Christophe-CMOONEY1
Personally, i prefer $date="$month-$year"; You could also use $date=join '-', $month, $year; but that's a little more awkward. -Original Message- From: John Edwards [mailto:[EMAIL PROTECTED]] Sent: Tuesday, July 24, 2001 9:46 AM To: 'shweta shah'; [EMAIL PROTECTED] Subject: RE: Concat

RE: Concatenation

2001-07-24 Thread John Edwards
Use a . to concatenate strings: $year = "01"; $month = "06"; $date = $month . "-" . $year; print $date; HTH John -Original Message- From: shweta shah [mailto:[EMAIL PROTECTED]] Sent: 24 July 2001 15:44 To: [EMAIL PROTECTED] Subject: Concatenation Hi friends, Is there a way to c

Concatenation

2001-07-24 Thread shweta shah
Hi friends, Is there a way to concatenate 2 arguments in one string using Perl like for eg $year and $month where $year=01 $month=06 and I want the result as a string 06-01 using Perl Thankx Shweta -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PRO

Sort an array of arrays?

2001-07-24 Thread Harry Goldhagen
Anyone know how to sort an array of arrays? To sort on the first column ($j = 0), I tried: $j = 0; for $i (0..$#AddBook) { @col = $AddBook[$i][$j]; @sortcol = sort @col; print "Column $j contains: @col\n"; } for $i (0..$#AddBook) { print "Column $j sorted contains: @sortcol\n"; } I get the las

Re: flat file

2001-07-24 Thread Paul
--- bc <[EMAIL PROTECTED]> wrote: > how, in perl/cgi, or, what is a popular way of connecting to, and > displaying, a csv file's contents to a browser, in table form? Er. Okay, um CSV as in Comma Seperated Values? ...start the page, print the table headers, make sure the file is open, then

Re: system interaction

2001-07-24 Thread Craig S Monroe
Basically, A portion of a script that I wrote, ftp's to a server grabs a particular file that was created and pulls it down. Once down, I used the system command to copy the file from one directory to another location. The problem with that is that I need to know what directory the script is bei

Fwd: Net::Telnet - It works now, but why?

2001-07-24 Thread Terry Poperszky
Did a little more poking around and then changed the command starting on line 11 to read as follows: while ($report = <$t>) { print $report; } Now it works, but I am not sure why? What condition is keeping that while loop going? Is it the fact that the telnet session assigned to $t is still o

RE: Custom add user script...

2001-07-24 Thread Ross, Jonathan C.
> I am having trouble with a portion of my custom add user script. I > want to display the contents of /etc/groups (gid 500-531) > numbered. I then want to input the number(s) of the groups I want to > add the user to (input should be in csv). The catch is I don't want > just any number to work -

follow up: interpolation of variables in here document

2001-07-24 Thread KAVANAGH, Michael
Sorry... you can completely ignore my previous message about here documents. It is working now, and the syntax was right. I was just looking at the wrong output! Mike Mike Kavanagh Internet Development Manager Oxford University Press W: http://www.oup.com V: +44 (0) 1865 267452 Fax: +44 1865

  1   2   >