perl embed problem

2002-12-08 Thread Ramprasad A Padmanabhan
hello all I think i am missing out something very small but not able to figure that out I have a very small c script ( taken from advanced perl by sriram srinivasan ) I am trying to compile it as given in the book and am not able to I am using gcc on redhat 7.2 gcc -I/usr/lib/perl5/5.6.0/i3

RE: Standard time and calendar functions for Perl?

2002-12-08 Thread Beau E. Cox
Hi - Look at Date::Manip on CPAN: http://search.cpan.org/author/SBECK/DateManip-5.40/Manip.pod Aloha => Beau. -Original Message- From: R. Joseph Newton [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 08, 2002 9:07 PM To: Beginners--Perl Subject: Standard time and calendar functions fo

Standard time and calendar functions for Perl?

2002-12-08 Thread R. Joseph Newton
Hi, I feel like I've just spent my afternoon reinventing the wheel. I'm working on a Perl script that is highly dependent on relative time, and I find myself having to create low-level functionality such as: sub NextMonth { my ($Month) = @_; %NextMonths = qw( Jan Feb Feb Mar Mar Apr

Re: func to see if an item exists in an array?

2002-12-08 Thread Sudarshan Raghavan
On Sun, 8 Dec 2002, christopher j bottaro wrote: > hey, > perl's got so many nifty little functions to make my life easier, i wonder if > it has anything that lets you see if an item exists in an array or if two > arrays are disjoint or the set difference of two arrays or anything like > that.

How does the Perl Module called "NET:ftp" logon to an FTP server?

2002-12-08 Thread Jason Kendall
Hello. This is my first email to [EMAIL PROTECTED] Please pardon the fact that this question is very vague...and longand any help is appreciated...thanks in advance... I have some Unix (korn shell) ftp scripts that automatically logon to remote ftp servers and get and put files. These scri

RE: func to see if an item exists in an array?

2002-12-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
If you have acces get the PERL Cookbook, it covers most of the items you would ever want. It covers item exists in an array or if two arrays are disjoint or the set difference of two arrays or anything like that. It is a must of have to help you think. Wags ;) -Original Messag

func to see if an item exists in an array?

2002-12-08 Thread christopher j bottaro
hey, perl's got so many nifty little functions to make my life easier, i wonder if it has anything that lets you see if an item exists in an array or if two arrays are disjoint or the set difference of two arrays or anything like that. sure i could write my own func, but hey, if its already the

Re: weird problems (dunno a good subject)

2002-12-08 Thread simran
sounds like some needed program/script is in your PATH when you run the script but not when you are in the shell... are you modifying your PATH variable in your script? On Mon, 2002-12-09 at 12:23, christopher j bottaro wrote: > hello again, > i wrote a perl script to compile and install kde for

Re: crypt()

2002-12-08 Thread simran
The first two letters of the encrypted string are the salt. eg: my $password = "abc"; my $salt = "GH"; my $encrypted = crypt($password, $salt); print "$encrypted\n"; print substr($encrypted, 0, 2), "\n"; will give you GHl/YThw3THFc GH On Sun, 2002-12-08 at

weird problems (dunno a good subject)

2002-12-08 Thread christopher j bottaro
hello again, i wrote a perl script to compile and install kde for me. compiling kde from scratch can be an all day affair so its nice to have an automated script to do it overnight or whatever. it works great if it finishes the whole way thru, but the problem arises when i kill the script befo

PERL MODULES PROBLEM

2002-12-08 Thread Dario Greco
hi to all, i need to calculate p-value of Student's t-test for many values. i've in input a TAB-delimited txt file in which there are many columns of numbers (they're means of values of alternatively "row data") for thousands of rows. I need in output of a TAB-delimited txt file with columns of

RE: File version info

2002-12-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
If it is Unicode, then it may require some type of special processing. If it is binary data, then it will stop after the first \n which it finds in the variable being searched. What you would really need to know is what is the real separator between fields(ie, could it be double null or s

RE: File version info

2002-12-08 Thread Gary Hawkins
Hope this is what you were asking for: Before the print... $pBlock =~ /VS_VERSION_INFO.*/; print $&; prints: VS_VERSION_INFO ╜♦∩■ The rest of the script is just sorting out the numbers. But Perl fails to match past whatever it sees as '\n' so the info isn't there to work with. $pBlock =~

Re: Super Newbie Q

2002-12-08 Thread Wiggins d'Anconia
Alan Moote wrote: Hey gang, As you will soon see, I am quite new to Perl. I am trying to out put a list of IPs that are trying to access cmd.exe on my webserver. The problem is, when I run the script against my access_log the output is a bunch of blank lines. Here's the script so far: #!/u

Super Newbie Q

2002-12-08 Thread Alan Moote
Hey gang, As you will soon see, I am quite new to Perl. I am trying to out put a list of IPs that are trying to access cmd.exe on my webserver. The problem is, when I run the script against my access_log the output is a bunch of blank lines. Here's the script so far: #!/usr/bin/perl -w ## Use

RE: File version info

2002-12-08 Thread Wagner, David --- Senior Programmer Analyst --- WGO
What is passing through to the screen is the actual binary/hex data. That is why the screeen has the little characters and the linefeeds. Can you provide that portion of the code, so we can see what you are trying to do? Wags ;) -Original Message- From: Gary Hawkins [mail

Re: superuser

2002-12-08 Thread Wiggins d'Anconia
Agreed. On top of zentara's suggestions, you might consider having a copy of your password file somewhere besides the actual system file, then update it through the web interface and then have a program that is run via, cron, etc. that then updates the main system file. That way you could keep

Re: crypt()

2002-12-08 Thread Jerry M . Howell II
thank you for your help, but still no dice. I am wondering what's going on here. I installed Crypt-PasswdMD5-1.2 perl module to make this work. my script is as follows (I know showing the salt isn't suposed to be done but before I put it to use I plan to randomly generate it) #!/usr/bin/perl print

Newbie in CPAN

2002-12-08 Thread Francesc Dantí
I'm trying to install GD module, but it doesn't runs. Error messages aren't so explicit for me. What's the problem? Compliling the package tar.gz, the result is the same: When I call "make" command # cc -c -I/usr/local/include -I/us

Re: crypt()

2002-12-08 Thread Chris Ball
>> On 8 Dec 2002 07:22:39, Jerry M. Howell II <[EMAIL PROTECTED]> said: > I used the useradd -p and it doesn't insert the passwd like it > should I should see something like $1$blahhblahhblahh but it > doesn't do this, if I manualy insert it it works fine but it looks > like print `/us

Re: crypt()

2002-12-08 Thread Jerry M . Howell II
ok, I finaly got it figured out just one last problem. I used the useradd -p and it doesn't insert the passwd like it should I should see something like $1$blahhblahhblahh but it doesn't do this, if I manualy insert it it works fine but it looks like print `/usr/sbin/useradd "$username" -p "$pw

Re: linked list's

2002-12-08 Thread Mystik Gotan
For one, I would use the -d flag to use debugging options and set $^D to whatever you want. -- Bob Erinkveld (Webmaster Insane Hosts) www.insane-hosts.net MSN: [EMAIL PROTECTED] From: Mark Goland <[EMAIL PROTECTED]> To: perl <[EMAIL PROTECTED]> Subject: linked list's Date: Sun,

Re: crypt()

2002-12-08 Thread Mystik Gotan
Hiya. Salt is just a thing which helps you encoding the stuff. From a book: The crypt Function The crypt function encrypts a string using the NBS Data Encryption Standard (DES) algorithm. The syntax for the crypt function is result = crypt (original, salt); original is the string to be

Re: superuser

2002-12-08 Thread zentara
On Sun, 8 Dec 2002 02:44:25 -0500, [EMAIL PROTECTED] (Jerry M . Howell II) wrote: >hello all, > > I am looking for a command and the best way to give a non-superuser >perlscript, ie, one that will be used in a web form the ability to add >a user using the standard unix admin tools like useradd.

crypt()

2002-12-08 Thread Jerry M . Howell II
hello there, Got another question. as far as I know I need the following to encrypt a passwd in perl. I plan to use it to add a users to my /etc/passwd /etc/shadow and /etc/group now I got a question cuz most newbees do :) what am I missing in this script I've narowed it down to the crypt comma

File version info

2002-12-08 Thread Gary Hawkins
This is an effort to write filever.exe in Perl. Filever extracts file version information and is available in the later Windows resource kits I think, or maybe as early as NT4. In verbose mode it prints info like this: D:\>filever.exe /v c:\windows\system32\kernel32.dll --a-- W32i DLL ENU

linked list's

2002-12-08 Thread Mark Goland
hi all, I am having problems printing this doubly list. the bug statment prints the expacted so I think I have the list setup right, but I cant get this list to print in reverse... any ideas ?? Thanx in Advance #!/usr/bin/perl -w $debug=1; for($i=1;$i<10;$i++){ $list = {value=>$i,prev=>$

Re: Using ssh for uptime?

2002-12-08 Thread Mark Goland
system returns shell exit status - Original Message - From: "Mark-Nathaniel Weisman" <[EMAIL PROTECTED]> To: "perl" <[EMAIL PROTECTED]> Sent: Sunday, December 08, 2002 3:23 AM Subject: RE: Using ssh for uptime? > This is the line that allowed me to capture a uptime value with Perl > us

superuser

2002-12-08 Thread Jerry M . Howell II
hello all, I am looking for a command and the best way to give a non-superuser perlscript, ie, one that will be used in a web form the ability to add a user using the standard unix admin tools like useradd. Can anyone give me some input on this? can it be done through sudo safely? Is there a be

RE: Using ssh for uptime?

2002-12-08 Thread Mark-Nathaniel Weisman
This is the line that allowed me to capture a uptime value with Perl using ssh to the remote boxes. $uptime = system "ssh -l $user $host uptime $pass"; The return value is; 65280 for all boxes. Anyone have any idea why I'm not reading the real uptimes, instead I get the number abo