Remove CRLF

2002-06-15 Thread Michael Pratt

Whats the command for removing the CRLF?

Mike



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




SPLIT - What is it?

2002-06-14 Thread Michael Pratt

Can someone explain to me what the purpose of split is?   I am assuming you
can take like a text file or something and separate it out?

Thanks
Mike



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: display a section of text

2002-06-13 Thread Michael Pratt

Well that doesnt give me what I want.  I want to search a text file for a
Key word then display the contents to a second keyword.

For example take the above paragraph and display just ' want to search a
text file for a Key word '  thats it.


Thanks
Mike



Jenda Krynicky [EMAIL PROTECTED] wrote in message
3D090354.10687.A1E14E@localhost">news:3D090354.10687.A1E14E@localhost...
 From: Mike [EMAIL PROTECTED]

  How can I scan a text file for a key word then display it down to a
  second keyword.  I know in VB the command is somthing like instr()

 If you want a direct counterpart of the VB's inStr() then it's
 index()
 perldoc -f index
 (This is supposed to be run. Either in the Run dialog or from command
 prompt)

 You may also want (or not) to look at regular expressions.
 perldoc perlretut

 Jenda
 === [EMAIL PROTECTED] == http://Jenda.Krynicky.cz ==
 There is a reason for living. There must be. I've seen it somewhere.
 It's just that in the mess on my table ... and in my brain
 I can't find it.
 --- me




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Password Generator

2002-02-08 Thread Michael Pratt

Im trying to setup a form that will generate a password and send it to you
via email.


Nikola Janceski [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 I think he wants to use the crypt() function.

 -Original Message-
 From: Hanson, Robert [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 08, 2002 5:22 PM
 To: 'Mike'; [EMAIL PROTECTED]
 Subject: RE: Password Generator


 To do what?  Just generate random passwords?

 How about this.

 my @c = (a..z,A..Z,0..9,qw|! @ # $ % ^  * ( ) [ ]|);
 for (1..8) { print $c[int(rand(@c) + 1)]; }

 Rob

 -Original Message-
 From: Mike [mailto:[EMAIL PROTECTED]]
 Sent: Friday, February 08, 2002 4:47 PM
 To: [EMAIL PROTECTED]
 Subject: Password Generator


 IS there a perl password generator out there?

 Mike


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 --
--
 
 The views and opinions expressed in this email message are the sender's
 own, and do not necessarily represent the views and opinions of Summit
 Systems Inc.




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Downloading FTP files

2002-01-30 Thread Michael Pratt

This is what I want to do:

I want to access a ftp server that has several directories in it under each
directory I want to grab all the text files and process them on to my
machine.


Is it possible to use a wild card in place of the directory?

Mike



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Downloading FTP files

2002-01-30 Thread Michael Pratt

I am using the FTP module. I was wondering if I could replace a dirctory
with a wild card instead of a just a file.


;)

Mike


Matt C. [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 use the Net::FTP module, which will accomplish your task in the blink of
an eye.
 It's got pretty much everything a standard ftp client has, and best of all
it's in
 perl!!

 Matt


 --- Michael Pratt [EMAIL PROTECTED] wrote:
  This is what I want to do:
 
  I want to access a ftp server that has several directories in it under
each
  directory I want to grab all the text files and process them on to my
  machine.
 
 
  Is it possible to use a wild card in place of the directory?
 
  Mike
 
 
 
  --
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 


 __
 Do You Yahoo!?
 Great stuff seeking new owners in Yahoo! Auctions!
 http://auctions.yahoo.com



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Reading text

2002-01-29 Thread Michael Pratt

What is the simplest means of reading a text file line by line.

Thanks!
Mike



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




listing files

2002-01-28 Thread Michael Pratt

This is what I want to do and I dont know where to start:

List files in a directory taking that list with just the filename and no
other information. using that information and populating a listbox.


Can someone help?

Mike



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Logging IP address to a file from the web.

2002-01-22 Thread Michael Pratt

I cant seem to get this to work is there something Im missing?

$logfile = '/logs/ipaccess.log';
$date = scalar localtime;

open(IPLOG, $logfile) || die Cannot open $logfile;
$ip = $ENV{'REMOTE_ADDR'};
print IPLOG $date ;
print IPLOG $ip \n;
close IPLOG;


Mike



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




What is wrong with this?

2002-01-22 Thread Michael Pratt

I am trying to log the users IP via the web and nothing happens the date
nore the ip get there. Also if I put the append to the open statement I get
an error via the web also.  This is the code. I got it to show up via the
web but it never gets to the file.  Is there something I am missing?

#!/usr/bin/perl

$logfile = '/usr/local/apache/logs/ipaccess.log';
$date = scalar localtime;

open(IPLOG, $logfile) || die Cannot open $logfile;
$ip = $ENV{'REMOTE_ADDR'};
print IPLOG $date;
print IPLOG $ip;
close IPLOG;


If I do it this way it errors out via the web:

#!/usr/bin/perl

$logfile = '/usr/local/apache/logs/ipaccess.log';
$date = scalar localtime;

open(IPLOG, $logfile) || die Cannot open $logfile;
$ip = $ENV{'REMOTE_ADDR'};
print IPLOG $date;
print IPLOG $ip;
close IPLOG;


Mike




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




NET::FTP

2001-12-27 Thread Michael Pratt

What is the easiest way to set up NET::FTP to try a different server if the
other isnt available?

Thanks!
Mike



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




ARGV

2001-12-17 Thread Michael Pratt

I cant seem to get the ARGV to work right via web I get not found error but
it works via command line. whats the trick?

It works if I do this get_file.pl test1.txt test2.txt

but it wont work via http://www.host.com/cgi-bin/get_files.pl test1.txt
test2.txt


Mike




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Scalar Localtime

2001-12-15 Thread Michael Pratt

I do like UNIX. I was just wondering what type of program would you write to
use that type of UNIX format?


Mike

Jonathan e. paton [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  I have a question. Why is it that I have to use 'scalar
  localtime' to view a datetime in the proper format.
  Why would I want to use the weird UNIX format that I
  can't read?

 You don't, but Perl isn't stupid enough to impliement
 several dozen ways of displaying the date... not in the
 language proper anyway...

 There is several Date modules on CPAN:

 http://search.cpan.org/Catalog/Data_and_Data_Type/
 http://search.cpan.org/Catalog/Data_and_Data_Type/Date/

 In particular, the Date::Format module allows you to
 construct date strings in a format you prefer.  You can
 even output years in Roman numeral format.

 Since some complain of too many (varying) date modules, I
 can hardly understand your complaint.  Guess you ain't a
 UNIX lover... :(

 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.com



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Scalar Localtime

2001-12-15 Thread Michael Pratt

I have a question. Why is it that I have to use Scalar localtime to view a
datetime in the proper format. why would I want to use the weird UNIX format
that I cant read?

Mike



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




wildcards in perl

2001-12-15 Thread Michael Pratt

How can I open several files with this format sn..txt where  is 0001
0002 so on and so on?


Thanks!

Mike



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Copy files from a location

2001-12-13 Thread Michael Pratt

Does anyone know how to go and get a file (with wild cards too) and dump 
them to a specifed directory on a local machine from the internet. weather 
it be ftp or http protocol? If so can I get an example?


Thanks for all your help!

Mike

_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




File date/time stamp

2001-12-13 Thread Michael Pratt

Hello,

How do I get a file date time stamp?

Thanks
Mike

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Question

2001-11-09 Thread Michael Pratt

Hello All!

This may be more of a linux quest but I would like to try and run iptables 
-L on Redhat through a perl script. Unfortunately it errors out because it 
requries root access to run it. Is there a way around this?

Have a great weekend!

Mike

_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]