problem with getting the noncrypted password from crypted

2002-02-19 Thread peter grotz
hi list, I´m using the following scripts to manage my passwords. I can crypt my new passwords to change the old one, but how can I get the clear pass from my crypted again?? Thanks for your hints!! Peter # test if passwords are equal $salt = substr($existuspassword, 0, 2); $incrypt = crypt($u

Re: HTML::TableExtract

2002-02-19 Thread John W. Krahn
Jeff 'Japhy' Pinyan wrote: > > On Feb 20, Kevin Old said: > > >if($a =~ qw/sorry/) { $sorry = 1; last SWITCH; } > >if($a =~ qw/kevin/) { $kevin = 1; last SWITCH; } > >if($a =~ qw/larry/) { $larry = 1; last SWITCH;} > > Uh, qw// is not the right th

Re: How this works?

2002-02-19 Thread Tushar Kulkarni
OK, Thanks. Now I have understood. Actually I saw this code at one place and it was used to trim starting and beginning spaces of values of hash(it had s/\s+$// and s/^\s+// in loop instead of $_ += 10). I tried same thing with numbers and got more confused(also in foreach '@h' is important. I

Re: How this works?

2002-02-19 Thread Jeff 'japhy' Pinyan
On Feb 20, Tushar Kulkarni said: >%h = ( one => 15, >two => 26, >three => 37 ); > >my @a; > >foreach (@a {keys %h}) { $_ = $_ + 10; } Uh, why did you declare @a and then use %a here? @a{...} is a HASH slice of %a. @a[...] is an ARRAY slice of @a. Two different things. What yo

Re: HTML::TableExtract

2002-02-19 Thread Jeff 'japhy' Pinyan
On Feb 20, Kevin Old said: >if($a =~ qw/sorry/) { $sorry = 1; last SWITCH; } >if($a =~ qw/kevin/) { $kevin = 1; last SWITCH; } >if($a =~ qw/larry/) { $larry = 1; last SWITCH;} Uh, qw// is not the right thing to use there. Perhaps q// or qq// or qr

Re: How this works?

2002-02-19 Thread Sudarsan Raghavan
Tushar Kulkarni wrote: > Hi, > I have this code, but I am not getting how this works. Can someone > help? > > %h = ( one => 15, > two => 26, > three => 37 ); > > my @a; Not sure what purpose this declaration serves. The 'a' referred to from here on in the code is the has

Re: How this works?

2002-02-19 Thread Tushar Kulkarni
Thanks Kevin, But I am really confused about 'foreach (@a{keys %h})'. What '%h' is doing here? Also I was under impression that '$_' is a copy of $a[0] ..$a[n] (or actually whatever we are using, - depends on context) , but here if I modify $_ it modifies actual variable. So is it alias?

Re: Stripping words from a string

2002-02-19 Thread Tanton Gibbs
s(world | how)//gi works for the same reason s{world | how}{}gi works The first and second set of regex delimiters do not have to be the same, so in the first instance, the first set of delimiters is () and the second set is //. - Original Message - From: "Wagner-David" <[EMAIL PROTECTED]>

RE: Stripping words from a string

2002-02-19 Thread Wagner-David
Though s(world .. worked w/o /, it should be written s/(world | how )//gi; Perl gurus, why does s(world |how )//gi w/o errors? Wags ;) -Original Message- From: Wagner-David Sent: Tuesday, February 19, 2002 21:48 To: 'Daniel Falkenberg'; [EMAIL PROTECTED] Subject: RE: Str

Re: How this works?

2002-02-19 Thread Kevin Old
Tushar, Truthfully, all it really does is print New 10 10 10 Below, I'll explain it line by line and show you how it really doesn't do that much. This is a hash where the key is "one" and the value is "15"...and so on, respectively. > %h = ( one => 15, > two => 26, > three => 3

Re: HTML::TableExtract

2002-02-19 Thread Kevin Old
Daniel, Try using a switch statement (even though Perl doesn't officially have a switch statement). Here's some code below.let me know if you have questions. #!/usr/bin/perl use HTML::TableExtract; @headers = ("kevin", "sorry", "larry"); foreach $a (@headers){ SWITCH: {

RE: Stripping words from a string

2002-02-19 Thread Wagner-David
Put the string in $_ and with s(world |how )//gi; If you don't take out a space then you get a couple of spaces: Output(no space part of check (world|how): Hello are you? Output(w/ space part of check above): Hello are you? Wags ;) -Original Message-

Stripping words from a string

2002-02-19 Thread Daniel Falkenberg
Hey all, Just wondering how I would go about stripping words from a string. If I have a string that has the following... $string = "Hello world how are you?"; How would I go about stripping the words 'how' and 'Hello' ignoring case each time? Would it go something like the following... $stri

How this works?

2002-02-19 Thread Tushar Kulkarni
Hi, I have this code, but I am not getting how this works. Can someone help? %h = ( one => 15, two => 26, three => 37 ); my @a; foreach (@a {keys %h}) { $_ = $_ + 10; } print "New\n"; foreach (@a{keys %h}) { print "$_\n"; } This prints New 10 10 10 Can s

renaming files (versioning)

2002-02-19 Thread Bill Akins
Hi all, After processing files in my perl script, I need to move them to the final destination. My problem is if the file already exists (lets call it data.txt), I need to rename it to data-v01.txt (where -v01 is version 01). So... if there are four other esisting versions, data-v03.txt should

Re: Matching a variable against nothing

2002-02-19 Thread Brett W. McCoy
On Wed, 20 Feb 2002, Daniel Falkenberg wrote: > Just wondering how I check if a variable contains nothing or not. I > thought it was something like the following... > > if ( $string eq '' ) { > print "String contains nothing"; > } else { > print "The string contains the following: $string";

Matching a variable against nothing

2002-02-19 Thread Daniel Falkenberg
Hey all, Just wondering how I check if a variable contains nothing or not. I thought it was something like the following... if ( $string eq '' ) { print "String contains nothing"; } else { print "The string contains the following: $string"; } Is this correct? Dan -- To unsubscribe, e-mai

HTML::TableExtract

2002-02-19 Thread Daniel Falkenberg
Hi all, At the moment I am working with HTML::TableExtract. I must say that I am having alot of fun with it and most of it is working really well. What I am looking for is some ideas on how I can go about the following... Basically I have my own CGI/Perl page that a user enters some credentials

Re: Email Validation

2002-02-19 Thread Kevin Meltzer
On Tue, Feb 19, 2002 at 03:53:57PM -0800, Roger Morris ([EMAIL PROTECTED]) said something similar to: > I hadn't found that module when I was searching the net. the > Email::Validdoesn't catch the @this_host.com It also doesn't catch | > in the email, which I would've thought shouldn't be

Re: Email Validation

2002-02-19 Thread Roger Morris
At 03:35 PM 2/19/2002 -0800, Randal L. Schwartz wrote: > > "Roger" == Roger Morris <[EMAIL PROTECTED]> writes: > >Roger> I've been working on email validation for a script. The examples I've >Roger> seen haven't exactly done that great of a job. I've taken the code >Roger> and messed with it

How to send html email from a linux box to recipents who use outlook 2k

2002-02-19 Thread FLAHERTY, JIM-CONT
Hello , I have a perl script thats sends dept managers active adp trouble calls to there email, is there a way I can send them in HTML format instead of text . I use redhat 7.1 , my users use outlook 2k on win 2k thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

RE: Changing Ownership

2002-02-19 Thread Timothy Johnson
Okay, I have to ask... Are you chomping your user input before you pass it to the function? Have you tested what $_ prints out? (E.g: print "\#$_\#";) -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 11:56 AM To: Perl Beg Subject: C

Re: Email Validation

2002-02-19 Thread Randal L. Schwartz
> "Roger" == Roger Morris <[EMAIL PROTECTED]> writes: Roger> I've been working on email validation for a script. The examples I've Roger> seen haven't exactly done that great of a job. I've taken the code Roger> and messed with it some. But not enough. :) Roger> sub valid_email () Roger>

RE: Grep function inside a for loop does NOT grep the values.

2002-02-19 Thread Nikola Janceski
can you give us a snip of what's in @prv_lst @txn_log -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 5:18 PM To: [EMAIL PROTECTED] Subject: Grep function inside a for loop does NOT grep the values. Hi, I am sorry, I meant to say

Re: Grep function inside a for loop does grep the values.

2002-02-19 Thread Brett W. McCoy
On Tue, 19 Feb 2002 [EMAIL PROTECTED] wrote: > Can somebody help me on what is wrong in the following piece of code? > > foreach (@prv_lst) > { > $item = $_; > @list_prv = grep (/$item/, @txn_log); > print "The foll. are the Txn details for Trading Partner $item \n"; >

Grep function inside a for loop does NOT grep the values.

2002-02-19 Thread Satya_Devarakonda
Hi, I am sorry, I meant to say grep does not work inside a for loop. regards, Satya - Forwarded by Satya Devarakonda/THP on 02/19/2002 05:18 PM -

Grep function inside a for loop does grep the values.

2002-02-19 Thread Satya_Devarakonda
Can somebody help me on what is wrong in the following piece of code? foreach (@prv_lst) { $item = $_; @list_prv = grep (/$item/, @txn_log); print "The foll. are the Txn details for Trading Partner $item \n"; print @list_prv; for (@txn_lst) {

RE: Storing Newsletter in Database

2002-02-19 Thread Stout, Joel R
Any thought to storing links to the docs in a db rather than the data itself, maybe with some keywords you can search on? Joel Headline- Apathy Runs Rampant; But Noone Seems to Care > -Original Message- > From: Timothy Johnson [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 19, 2

RE: Storing Newsletter in Database

2002-02-19 Thread Timothy Johnson
I think the last time I tried to make a webpage with Publisher it made the whole document into a picture background with links on top. That might put a dent in your plan if that's still the way it's set up. -Original Message- From: Kevin Old [mailto:[EMAIL PROTECTED]] Sent: Tuesday, Feb

Re: Is it just a question of preference/time/money?

2002-02-19 Thread Brett W. McCoy
On Tue, 19 Feb 2002, Nikola Janceski wrote: > I have old perl code, but it still does what it needs to, and is currently > being used. > Now I need to make changes to the code, (about once every 4 months). > Over time we all code better -- learning better ways to write things, > clearer ways to w

Re: qw for variables?

2002-02-19 Thread Andrea Holstein
In article <[EMAIL PROTECTED]> wrote "Dennis G. Wicks" <[EMAIL PROTECTED]>: > Greetings; > > I can get qw to work for things like > > @n = qw( john jacob jingleheimer schmidt ); > > but something like > > @n = qw( $names ); > > doesn't work. I get the literal string "$names"

Storing Newsletter in Database

2002-02-19 Thread Kevin Old
Hello all, I have a challenge that has been put on me. I have built a website for my church and we are now wanting to put our newsletter online. It is currently being done in Microsoft Publisher. I would like to take the MS Publisher file and extract the data and insert it into a database (Pos

How to I am not sure how to reference a perl script from the web

2002-02-19 Thread Lance Prais
I am not sure how to do this. I wrote a perl script that searches a doc table and I need to have it called when I reference a web page. Example. a user searches my site for a particular solution. After they read it there is an option to give feedback to as weather or not it helped them. In th

Is it just a question of preference/time/money?

2002-02-19 Thread Nikola Janceski
I have old perl code, but it still does what it needs to, and is currently being used. Now I need to make changes to the code, (about once every 4 months). Over time we all code better -- learning better ways to write things, clearer ways to write code, write more comments. Note: I haven't started

Re: Email Validation

2002-02-19 Thread Kevin Meltzer
Hi Roger, Have you looked at the Email::Valid and Mail::Address modules? Mail::Address will piece apart an email address (address, phrase, etc..) and Email::Valid can do RFC822 some address validation (including MX host checking). Cheers, Kevin On Tue, Feb 19, 2002 at 11:37:49AM -0800, Roger Mo

Changing Ownership

2002-02-19 Thread slhgkh5
I am working on AIX 4.3 and attempting to change ownership of files. Below is an excerpt from my script of the area that is causing the problem. defined($user = getpwnam "$_") or die "Bad user name"; defined($group = getgrnam "staff") or die "Bad group name"; chdir "/home/$_"; chown $user, $gr

Email Validation

2002-02-19 Thread Roger Morris
I've been working on email validation for a script. The examples I've seen haven't exactly done that great of a job. I've taken the code and messed with it some. My thoughts were, if the email is in the correct format, ie [EMAIL PROTECTED] or some form like [EMAIL PROTECTED] then go to

Re: can't find docs on '<<'

2002-02-19 Thread Peter Scott
At 02:08 PM 2/19/02 -0500, Nikola Janceski wrote: >I am looking for the documentation on the << operator in the context of the >following: > >print END perldata, end of the section on Scalar value Constructors. It could be easier to find. I keep expecting to find it i

Re: qw for variables?

2002-02-19 Thread Dennis G. Wicks
The split did the trick, and cut out a few lines of code also. I had already done some splits and joins to get ready for qw() which I can n ow delete! Thanks for the help everyone! Dennis -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

can't find docs on '<<'

2002-02-19 Thread Nikola Janceski
I am looking for the documentation on the << operator in the context of the following: print <

Re: Illegal seek

2002-02-19 Thread Randal L. Schwartz
> "Tony" == Tony McGuinness <[EMAIL PROTECTED]> writes: Tony> I checked up on system and rewrote the line that Tony> calls system. Now I have: Tony> @args = ("$Basedir/ftpscr"); Tony> system(@args) == 0 or die "cannot execute ftpscr $!"; Tony> but the script is not executed. No errors are r

Advice wanted: source code to perl-postgres web app

2002-02-19 Thread GoodleafJ
Hello, I'm looking to prototype a system with a postgresql back end where the gui is provided conveniently in a web browser. Though I considered using php for connectivity, I currently lean toward perl. (I'm not trolling here. My only reason for choosing perl over php is that I know more about it

Re: qw for variables?

2002-02-19 Thread Johnathan Kupferer
Dennis G. Wicks wrote: >Greetings; > >No, I mean if $names contains "Jesus Mary Joseph" and I do > > my @n = qw( $names ); > >I want the same results as if I had done > > my @n = qw( Jesus Mary Joseph ); > >Obviously qw() does not work this way, but I can't find the >equivalent that d

RE: foreach() index scoping question

2002-02-19 Thread Nikola Janceski
You could use a temporary variable to keep the last value. >my $temp; >foreach my $elem (@long_list) { >my $k="junk"; >foreach $k (keys %hash) { > $temp = $k; > last if($elem =~ /$k/);## ok, I've got the $k I need >} >$hash{$temp}->{'foo'} = 42;## n

Re: PERL - JAVASCRIPT Help please

2002-02-19 Thread Johnathan Kupferer
This really isn't a perl question. Write out your javascript in a simple HTML file and see if that works. If it does then port write the perl code to output that HTML. This isn't the forum for this but... When you call nwin.document.write() you should be passing HTML, not just any old stri

Re: foreach() index scoping question

2002-02-19 Thread Jeff 'japhy' Pinyan
On Feb 19, Bradford Ritchie said: >foreach my $elem (@long_list) { >my $k="junk"; >foreach $k (keys %hash) { > last if($elem =~ /$k/);## ok, I've got the $k I need >} >$hash{$k}->{'foo'} = 42;## oops, $k is reset to "junk" >} That behavior is documented, yes. P

RE: qw for variables?

2002-02-19 Thread Nikola Janceski
you want split then.. my $names = "Jesus Mary Joseph"; my @n = split /\s+/, $names; -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 3:08 PM To: [EMAIL PROTECTED] Subject: Re: qw for variables? Greetings; No, I mean if $names cont

Re: qw for variables?

2002-02-19 Thread Jeff 'japhy' Pinyan
On Feb 19, Dennis G. Wicks said: >No, I mean if $names contains "Jesus Mary Joseph" and I do > > my @n = qw( $names ); > >I want the same results as if I had done > > my @n = qw( Jesus Mary Joseph ); There's no quoting operator that will do that for you. I'd suggest using split().

Re: qw for variables?

2002-02-19 Thread Dennis G. Wicks
Greetings; No, I mean if $names contains "Jesus Mary Joseph" and I do my @n = qw( $names ); I want the same results as if I had done my @n = qw( Jesus Mary Joseph ); Obviously qw() does not work this way, but I can't find the equivalent that does. Thanks, Dennis >}On Feb 19,

Re: How to count lines in an output file

2002-02-19 Thread Tim Lago
thanks for everyones help, it worked great. "Tim Lago" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > I've written a really simple script that opens a file, reads for specific > line of text and copies the matches to an output file, > > Here it is: > > open(IN

Re: qw for variables?

2002-02-19 Thread Jonathan E. Paton
> What does the equivalent of qw(???) for a variable? You mean like: my @array = ($var1, $var2, $var3); Jonathan Paton __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.

RE: qw for variables?

2002-02-19 Thread Nikola Janceski
qw( john jacob $name ) is equivelent to ('john', 'jacob', '$name') notice the single quote. The single quotes does not interpolate (use the special meanings of special charaters, so the $ doesn't designate a varible name it's just a $ character). see man perlop or perldoc perlop -Original

qw for variables?

2002-02-19 Thread Dennis G. Wicks
Greetings; I can get qw to work for things like @n = qw( john jacob jingleheimer schmidt ); but something like @n = qw( $names ); doesn't work. I get the literal string "$names" in @n! What does the equivalent of qw(???) for a variable? Many TIA! Dennis -- To unsubscribe,

Regular Expressions II

2002-02-19 Thread Kittler, Karl
Okay, I got the string parsing working with one exception. When the tag runs across two or more lines the test fails. Any suggestions? Here's what I'm using for a multiple tag search throughout the string(condensed): while ($line =~ m/<[\s]*A[\s]*HREF[\s]*=[\s]*["|'|]*([\D\w\d][^'">\s]*)["

RE: system

2002-02-19 Thread Tony McGuinness
Hi Brett, Thanks for the response. I have changed the $! to $? and I was using -w and strict at the top of my script. I cannot help the disclaimer. Sorry. Regards, Tony -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 17:03 To: Tony McGuinness

Re: system

2002-02-19 Thread Brett W. McCoy
On Tue, 19 Feb 2002, Tony McGuinness wrote: > I have the following code and the system call just does not happen. > > Furthermore there is no error message. > > $arg = "$Basedir/ftpscr"; > system($arg) == 0 or die "cannot execute ftpscr $!"; > > At this stage $Basedir/ftpscr exists and is an exec

Re: im a beginner using perl

2002-02-19 Thread shock
Check out Mail::Sendmail at http://search.cpan.org/search?mode=module&query=mail%3A%3Asendmail * Wood, Richard ([EMAIL PROTECTED]) spake thusly: > > > All, > > This is part of what I have, if the service is not equal to 1, how would I > issue a command to email someone? Can not find this i

RE: How to count lines in an output file

2002-02-19 Thread Timothy Johnson
I guess I should have checked the responses first. Well, I guess if there was any doubt... :) -Original Message- From: Timothy Johnson To: 'Tim Lago '; [EMAIL PROTECTED] Sent: 2/19/02 8:12 AM Subject: RE: How to count lines in an output file You could always try something like this:

system

2002-02-19 Thread Tony McGuinness
Hi, I have the following code and the system call just does not happen. Furthermore there is no error message. $arg = "$Basedir/ftpscr"; system($arg) == 0 or die "cannot execute ftpscr $!"; At this stage $Basedir/ftpscr exists and is an executable ksh script. I have similar scripts that are w

im a beginner using perl

2002-02-19 Thread Wood, Richard
All, This is part of what I have, if the service is not equal to 1, how would I issue a command to email someone? Can not find this in the literature. Check certain ARS stuff #1) Check for the availability of telalert $telalertcheck=`ps -ef | grep telalertd | grep -v grep`; $telreturn=

foreach() index scoping question

2002-02-19 Thread Bradford Ritchie
Hi, I want to use a foreach loop to iterate over a list but I want to be able to retain the index variable when the loop ends (either at the end of the list or by an early-exit "last" statement). Given the following example code: #!/usr/bin/perl -w use strict; my %hash = ( "one" => {},## T

RE: How to count lines in an output file

2002-02-19 Thread Timothy Johnson
You could always try something like this: while() { if(/$realname/) { print OUTFILE; $count++; } } $count should have the number of lines at the end. -Original Message- From: Tim Lago To: [EMAIL PROTECTED] Sent: 2/19/02 6:30 AM Subject: How to count lines in an output file I'

RE: Changing STDERR

2002-02-19 Thread Laycock, Angus
Job sorted, it works!!! Thanks you all for your help. Gus -Original Message- From: Jenda Krynicky [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 15:20 To: '[EMAIL PROTECTED]' Subject: Re: Changing STDERR From: "Laycock, Angus" <[EMAIL PROTECTED]> > Can someone tel

Re: help with html

2002-02-19 Thread Jenda Krynicky
From: "Chris Zampese" <[EMAIL PROTECTED]> > -- Honestly, no spam. Just want to automate the office a bit. Changed > a form that they usually send by paper (fax or snail mail) to an email > form. Wouldn't it be better to put the form on your (read "the company you do this for"

Re: Changing STDERR

2002-02-19 Thread Jenda Krynicky
From: "Laycock, Angus" <[EMAIL PROTECTED]> > Can someone tell me how to change STDERR to output to a file then > change it back to its original output. #!perl -w print STDERR "First msg\n"; use vars qw(*ORIGSTDERR); # to make -w happy ope

Re: Table Access OR File Manipulation

2002-02-19 Thread Jenda Krynicky
From: "Ho, Tony" <[EMAIL PROTECTED]> > I am currently designing Perl DBI code to extract data from tables > from Sybase Database under UNIX. There are a dozen of tables I need to > extract information from. The biggest tables are ACCOUNTS and > SUBSCRIBERS. ACCOUNT has 10 million

Re: Running Perl Scripts

2002-02-19 Thread William.Ampeh
Do this: 1. Open up a terminal session 2. Type "which perl" or to get the location of the Perl interpreter 3. On the very first line of your Perl program, insert the location of the Perl interpreter as determined in 2. In my case, this what I got: momoni:/home/william/bin/PERL_CGI(4)

Re: How to count lines in an output file

2002-02-19 Thread Geoffrey F. Green
See below: On 2/19/02 9:30 AM, "Tim Lago" <[EMAIL PROTECTED]> wrote: > open(INFILE, "rmaccess1.txt"); > open(OUTFILE, ">outfile.txt"); > > print "Enter the name of the Media file to analyze and press Enter: \n"; > > chomp($realname = ); my $count; > while() { > > if(/$realname/) { > print

RE: How to count lines in an output file

2002-02-19 Thread John Edwards
open(INFILE, "rmaccess1.txt") or die "Can't open rmaccess1.txt: $!"; open(OUTFILE, ">outfile.txt") or die "Can't create outfile.txt: $!"; # ALWAYS check for errors when opening file handles. It's a good habit to get into. print "Enter name of the Media file to analyse: "; # I'd keep the above on

RE: How to count lines in an output file

2002-02-19 Thread Tony McGuinness
-Original Message- From: Tim Lago [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 14:31 To: [EMAIL PROTECTED] Subject: How to count lines in an output file I've written a really simple script that opens a file, reads for specific line of text and copies the matches to an output file,

Re: Perl and apache

2002-02-19 Thread Johannes Franken
On Tue, Feb 19, 2002 at 02:32:34AM +, Matthew Harrison wrote: > I am a newbie to perl and linux and i am having trouble with my apache server > and cgi scripts. > [Tue Feb 19 02:23:39 2002] [error] (2)No such file or directory: exec of > /var/www/cgi-bin/admin.cgi failed First thing I'd su

ifconfig and too many pppd's

2002-02-19 Thread Ian McKenna
Hi, I am new to PERL and have a relativly easy question. I have a SUSE Linux machine that does some dial-up, gathers infirmation from the servers I look after, however he dial up when shut down keeps a pppd deamon up, sometime I see at least 20 ppp1ppp21 for example. I've tried to write a PER

How to count lines in an output file

2002-02-19 Thread Tim Lago
I've written a really simple script that opens a file, reads for specific line of text and copies the matches to an output file, Here it is: open(INFILE, "rmaccess1.txt"); open(OUTFILE, ">outfile.txt"); print "Enter the name of the Media file to analyze and press Enter: \n"; chomp($realname =

RE: Illegal seek

2002-02-19 Thread John Edwards
Sorry, I can't help with this issue. It was just something to try based on your last post. I've cc'd this back to the list. Please keep the discussion there. Thanks John -Original Message- From: Tony McGuinness [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 15:08 To: John Edwards Su

RE: Illegal seek

2002-02-19 Thread John Edwards
OK. Maybe I've missed something here, but why are you storing a single string in an array?? Try this $arg = "$Basedir/ftpscr"; if (system($arg)) { die "cannot execute ftpscr $!"; } John -Original Message- From: Tony McGuinness [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 14:55 To:

Illegal seek

2002-02-19 Thread Tony McGuinness
Hi there, I checked up on system and rewrote the line that calls system. Now I have: @args = ("$Basedir/ftpscr"); system(@args) == 0 or die "cannot execute ftpscr $!"; but the script is not executed. No errors are returned. Any ideas? Tony =

Sorted off list (was: help with html)

2002-02-19 Thread John Edwards
Just FYI, this was sorted off list. Chris, see what happens when you take things off list... John -Original Message- From: Chris Zampese [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 11:42 To: John Edwards Subject: Re: help with html Thanks John, I will rewrite my script so

Re: help with html

2002-02-19 Thread William.Ampeh
If you are really determined to send "an html document via email", you can simply rename the file(remove the .htm[l] extension), send it, and let the recipients rename it back. Alternatively, I will simply send the file in plain ASCII (text) form. Another way is to compress the file, and send i

Re: Table Access OR File Manipulation

2002-02-19 Thread Gyro
Greeting Tony, "Tony Ho" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hi guys > I was wondering if you could help me. > > I am currently designing Perl DBI code to extract data from tables from > Sybase Database under UNIX. > There are a dozen of tables I ne

Re: Illegal seek

2002-02-19 Thread Jeff 'japhy' Pinyan
On Feb 19, Tony McGuinness said: >from a simple Perl script (below). The system command is returning >the error and the pathname points to the current directory. I cannot >seem to find any documentation on this error. Has anyont encountered >the same. As John said, Perl has a module for FTP. >s

Re: Changing STDERR

2002-02-19 Thread Jeff 'japhy' Pinyan
On Feb 19, Laycock, Angus said: >Can someone tell me how to change STDERR to output to a file then change it >back to its original output. Look at the documentation for open(). It shows you how to temporarily change a filehandle. Here are the first four lines of code: open(OLDOUT, ">&STDOUT

Re: Illegal seek

2002-02-19 Thread John W. Krahn
Tony McGuinness wrote: > > Hi there, Hello, > I am getting the following: > > cannot execute ftpscr Illegal seek at ./getfile.pl line 31. > > from a simple Perl script (below). The system command is returning > the error and the pathname points to the current directory. I cannot > seem to fin

RE: help with html

2002-02-19 Thread MECKLIN, JOE (ASI)
Instead of trying to force your interpretation of what they should see, you might consider just sending straight ASCII text; the information is still delivered, they can do what they wish with it and the network overall will thank you for your lack of bandwidth use. Obviously they don't require ht

Re: Regular exps on files

2002-02-19 Thread zentara
On Mon, 18 Feb 2002 14:40:17 -0900, [EMAIL PROTECTED] (Michael Fowler) wrote: >On Mon, Feb 18, 2002 at 07:20:50AM -0500, zentara wrote: >> You are using nested while loops to iterate >> thru a file, this isn't necessary. Also you don't need to >> open a file just to loop thru it. > >Yes, you do.

Re: help with html

2002-02-19 Thread Chris Zampese
you're right. it does sound bad. someone call spam cop :-) -- Honestly, no spam. Just want to automate the office a bit. Changed a form that they usually send by paper (fax or snail mail) to an email form. -Original Message- From: Chris Zampese [mailto:[EMAIL PROTECTED]] Sent: 19 Februar

RE: Segmentation fault - core dumped

2002-02-19 Thread gross, cedric
> De : Ken Clark [mailto:[EMAIL PROTECTED]] > Envoyé : mardi 19 février 2002 12:54 > could you be more precise? you could backtrace it, and send > that in as a > bug, if it is one. and what version are you using? what were you doing > when it failed? is there consistency with the failure? I'm r

RE: help with html

2002-02-19 Thread Darren Simpson
you're right. it does sound bad. someone call spam cop :-) -Original Message- From: Chris Zampese [mailto:[EMAIL PROTECTED]] Sent: 19 February 2002 11:49 To: perl list Subject: help with html This question probably belongs in the cgi list, but here goes... I know that this is going

Illegal seek

2002-02-19 Thread Tony McGuinness
Hi there, I am getting the following: cannot execute ftpscr Illegal seek at ./getfile.pl line 31. from a simple Perl script (below). The system command is returning the error and the pathname points to the current directory. I cannot seem to find any documentation on this error. Has anyont enco

RE: help with html

2002-02-19 Thread John Edwards
"I want to send an html document via email to people that have blocked html" Why? Can't you send a text file? What's special about this HTML page? Does it contain links to web URLs? If so have you considered that they may not have web access? "The main thing that I want this for is the ability t

help with html

2002-02-19 Thread Chris Zampese
This question probably belongs in the cgi list, but here goes... I know that this is going to sound bad, but I want to send an html document via email to people that have blocked html (I am doing a form for an insurance broker, and it goes to the insurance companies that they deal with. The

Changing STDERR

2002-02-19 Thread Laycock, Angus
Please, Can someone tell me how to change STDERR to output to a file then change it back to its original output. my $oldout = select STDERR; print STDERR "test1\n"; open STDERR, ">test.txt" or die "Can't open file STDERR [OUTPUT]"; print STDERR "test2\n";# goes to file select $ol

Re: Delete lines in a file

2002-02-19 Thread John W. Krahn
Wim wrote: > > Hey folks! Hello, > I'm gonna ask a question that is asked mayby thousand times, but I can't > find out how I delete complete lines in a file without leaving empty > lines. What have you tried? Have you read the solution in the FAQ? perldoc -q "delete a line in a file" Joh

Re: Perl and apache

2002-02-19 Thread Shaun Sloan
Matthew Harrison wrote: > [Tue Feb 19 02:23:39 2002] [error] (2)No such file or directory: exec of > /var/www/cgi-bin/admin.cgi failed In order to get scripts to run from a web page you have to tell Apache: - Where the script file is - That is needs to be executed This is done by the ScriptAlia

Delete lines in a file

2002-02-19 Thread wim
Hey folks! I'm gonna ask a question that is asked mayby thousand times, but I can't find out how I delete complete lines in a file without leaving empty lines. -- Kind regards, Wim De Hul Belgacom Belbone Mail : [EMAIL PROTECTED] Mobile : +32 479 9520

Table Access OR File Manipulation

2002-02-19 Thread Ho, Tony
Hi guys I was wondering if you could help me. I am currently designing Perl DBI code to extract data from tables from Sybase Database under UNIX. There are a dozen of tables I need to extract information from. The biggest tables are ACCOUNTS and SUBSCRIBERS. ACCOUNT has 10 million rows and

Segmentation fault - core dumped

2002-02-19 Thread gross, cedric
Dear all,   Sometimes with this piece of prog join I obtain a segmentation fault - core dumped... Why ? and How I could solve it ?     Thanks for help meta_extract.pl Description: meta_extract.pl -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTEC