re: reg ftp

2001-05-25 Thread Steve Neu

Here's one I like... (for removing evil ctrl M's)

perl -w -i -p -e "s/\x0d//g" filename

Stephen Neu
Internet Development
Characterlink.net
(630) 323-9800 ext. 235

#!/usr/bin/perl
#JustAnotherPerlHacker
($, ,@j15)=('t','Kvt'  ,' Bop','ifs',
' Q',  'sm Ibdl'   ,'s') ;foreach
( @j15){ tr/B-Zb-z/A-Ya-y/}print @j15
[0..2];$,=~ tr/t/e/;print @j15[3..5];






Re: Is there an alternative to #!/usr/bin/perl

2001-05-24 Thread Steve Neu

Perhaps people understand this already, but I wanted to state it,
because I haven't heard it specifically said.  (Redundancy is good in a
learning environment)
The point is that, if you do not know where Perl is located, you likely
cannot run the script without finding Perl.  For this reason, your
"Perl-finding mission" is going to have to take place outside of your
script.  No amount of anything you put in that script is going to do
anything if you cannot find Perl.  Otherwise, you have code that needs to
find Perl so it can run the code that needs to find Perl so it can run the
code that needs to find Perl so it can... etc.
On a Win box with ActivePerl, however, the system will simply see that
the file has the correct extension and run it, ignoring the sh'bang as a
comment.  Though, this is probably not your situation.

Stephen Neu
Internet Development
Characterlink.net
(630) 323-9800 ext. 235




Re: Location.

2001-05-17 Thread Steve Neu

: Kind of off topic but, is anyone in this list located
: in NYC?

Let's try to send responses to this directly to RS, and not to the list.
Thanx, my inbox appreciates it! :-)

Stephen Neu
Internet Development
Characterlink.net
(630) 323-9800 ext. 235




Re: foo bar?

2001-05-16 Thread Steve Neu

For more information about words like "foo" and "bar"... you can consult
"the Jargon File", found in several spots on the web.  Here's one of its
locations...

http://www.tuxedo.org/~esr/jargon/

Stephen Neu
Internet Development
Characterlink.net
(630) 323-9800 ext. 235




Use of filters.................??

2001-05-15 Thread Steve Neu

To Gary:
Can you not filter by the "To:" header?  That's what I do.  As far as I
know, it is always set to [EMAIL PROTECTED]  Correct me if I am wrong.

To the owner of the list:
Is there some disadvantage or problem with having the "Reply-to" header
set to [EMAIL PROTECTED]?  As I say earlier, if there is something I am
missing, due to my relative ignorance on the subject, please correct me.

Stephen Neu
Internet Development
Characterlink.net
(630) 323-9800 ext. 235





Re: newbie: CPAN module usage.

2001-05-09 Thread Steve Neu

Brett...

Try 'ppm' at the command line.
___
C:\WINNT\Profiles\sneu\Desktop>ppm
PPM interactive shell (2.1.2) - type 'help' for available commands.
PPM>
Commands:
exit  - leave the program.
help [command]- prints this screen, or help on 'command'.
install PACKAGES  - installs specified PACKAGES.
quit  - leave the program.
query [options]   - query information about installed packages.
remove PACKAGES   - removes the specified PACKAGES from the system.
search [options]  - search information about available packages.
set [options] - set/display current options.
verify [options]  - verifies current install is up to date.
version   - displays PPM version number

PPM>


Stephen Neu
Internet Development
Characterlink.net
(630) 323-9800 ext. 235

"The camel was not designed to smell good. Neither was Perl."
 --Larry Wall

- Original Message - 
From: "SS HK" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2001 12:09 PM
Subject: newbie: CPAN module usage.


> Hi,
> 
> I would like to install some of the CPAN modules. How
> can I do that. I am using ActivePerl on Windows.
> 
> Any pointers would be greatly helpful. 
> 
> regards,
> inssic.
> 
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> 




Re: newbie: CPAN module usage.

2001-05-09 Thread Steve Neu

Brett...

Try 'ppm' at the command line.
___
C:\WINNT\Profiles\sneu\Desktop>ppm
PPM interactive shell (2.1.2) - type 'help' for available commands.
PPM>
Commands:
exit  - leave the program.
help [command]- prints this screen, or help on 'command'.
install PACKAGES  - installs specified PACKAGES.
quit  - leave the program.
query [options]   - query information about installed packages.
remove PACKAGES   - removes the specified PACKAGES from the system.
search [options]  - search information about available packages.
set [options] - set/display current options.
verify [options]  - verifies current install is up to date.
version   - displays PPM version number

PPM>


Stephen Neu
Internet Development
Characterlink.net
(630) 323-9800 ext. 235

"The camel was not designed to smell good. Neither was Perl."
 --Larry Wall

- Original Message - 
From: "SS HK" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2001 12:09 PM
Subject: newbie: CPAN module usage.


> Hi,
> 
> I would like to install some of the CPAN modules. How
> can I do that. I am using ActivePerl on Windows.
> 
> Any pointers would be greatly helpful. 
> 
> regards,
> inssic.
> 
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> 




Re: newbie: CPAN module usage.

2001-05-09 Thread Steve Neu

Brett...

Try 'ppm' at the command line.
___
C:\WINNT\Profiles\sneu\Desktop>ppm
PPM interactive shell (2.1.2) - type 'help' for available commands.
PPM>
Commands:
exit  - leave the program.
help [command]- prints this screen, or help on 'command'.
install PACKAGES  - installs specified PACKAGES.
quit  - leave the program.
query [options]   - query information about installed packages.
remove PACKAGES   - removes the specified PACKAGES from the system.
search [options]  - search information about available packages.
set [options] - set/display current options.
verify [options]  - verifies current install is up to date.
version   - displays PPM version number

PPM>


Stephen Neu
Internet Development
Characterlink.net
(630) 323-9800 ext. 235

"The camel was not designed to smell good. Neither was Perl."
 --Larry Wall

- Original Message - 
From: "SS HK" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 09, 2001 12:09 PM
Subject: newbie: CPAN module usage.


> Hi,
> 
> I would like to install some of the CPAN modules. How
> can I do that. I am using ActivePerl on Windows.
> 
> Any pointers would be greatly helpful. 
> 
> regards,
> inssic.
> 
> __
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/
> 




Re: Skipped lines

2001-05-04 Thread Steve Neu

I was thinking CTRL-C would exit the program prematurely without printing
anything but I didn't try it, so I am probably wrong.





Re: Outputting content to the web

2001-05-01 Thread Steve Neu

Mr. Owens,

I find that the best way to write CGI scripts is to write them and run
them on the command line.  Then, when I know that they run without errors, I
put them on my web server.
If you do this, you can also specify...
#!/usr/bin/perl -w
(with the -w on the end) to get more information.  This will assure you
that your problem is not in your script, but somewhere else.
Also, are you running a web server on your computer?  Your statement,
"...providing the full path to it in the address bar of my browser..." makes
me think you are not.  Otherwise you would say something like
"http://localhost/directory/script.pl"; (on a windows box, anyway).

Also, I believe you might find the CGI:Carp module interesting.
"perldoc CGI::Carp"

Stephen Neu
Internet Development
Characterlink.net
(630) 323-9800 ext. 235

"What is so difficult for developers to accept sometimes is that there
already is a standard, and they didn't write it."
   --Steve Neu





CR LF

2001-04-27 Thread Steve Neu

Billy,

I do a lot of Perl on an NT box that eventually gets used in both NT and
Debian.  It was pretty frustrating at first, experiencing your problem.  A
nice little one-liner that I use after taking a script from NT to a linux
system is:

perl -w -i -p -e "s/\x0d//g" filename

Stephen Neu
Internet Development
Characterlink.net
(630) 323-9800 ext. 235

"What is so difficult for developers to accept sometimes is that there
already is a standard, and they didn't write it."
   --Steve Neu





CR LF

2001-04-27 Thread Steve Neu

Billy,

I do a lot of Perl on an NT box that eventually gets used in both NT and
Debian.  It was pretty frustrating at first, experiencing your problem.  A
nice little one-liner that I use after taking a script from NT to a linux
system is:

perl -w -i -p -e "s/\x0d//g" filename

Stephen Neu
Internet Development
Characterlink.net

"What is so difficult for developers to accept sometimes is that there
already is a standard, and they didn't write it."
   --Steve Neu






Re: Passing data arguments via command line

2001-04-24 Thread Steve Neu

> perl myscript.pl "data1" "data2 "data3"
>
> (a) is it possible to pass data arguments via the command line in this
way?

Yes, indeed.  Anything that is passed to your program in this way will be
stored in the array, @ARGV.  You can access the first argument with
$ARGV[0], the second with $ARGV[1], and so on.

> (b) inside the script I want to assign them to variables -- but how do I
> reference them? Do they count as being on STDIN or something?

You can assign them at the beginning of your script usign the following:

my @theArguments = @ARGV   #all of them in an array

-or-

my ($username, $password, $logfile, $filename) = @ARGV
 # Expect 4 arguments
 # Ignore the rest for now