RE: Is CYGWIN a unix like environment to run PERL modules?

2005-01-18 Thread arjun.mallik
Hi CYGWIN installation is in two parts , I am not sure whether u have followed that ? And CYGWIN is like X-windows to work on UNIX session from Windows machines... Other s/w like this are Exceed [ licensed..]. If u want I can give u the full CYGWIN s/w I have. cheers Arjun Deserve before you

Dynamic pattern matching?

2005-01-18 Thread Dan Fish
I've got a data file that for the most part, the entries look like: (The last 3 columns are data points...) LKG_535 P10X0.6 -2.00E-09 0.00E+00 amps -3.800E-13 -3.920E-12 -7.800E-13 VT_GM L0.8H40 -1.15E+00 -7.50E-01 volts-1.104E+00 -1.111E+00 -1.110E+00

RE: Dynamic pattern matching?

2005-01-18 Thread Moon, John
I've got a data file that for the most part, the entries look like: (The last 3 columns are data points...) LKG_535 P10X0.6 -2.00E-09 0.00E+00 amps -3.800E-13 -3.920E-12 -7.800E-13 VT_GM L0.8H40 -1.15E+00 -7.50E-01 volts-1.104E+00 -1.111E+00 -1.110E+00

regex needed

2005-01-18 Thread Chris Knipe
Lo everyone, Can someone please give me a regex to parse the following... Flags: X - disabled, I - invalid, D - dynamic, J - rejected, C - connect, S - static, r - rip, o - ospf, b - bgp #DST-ADDRESSG GATEWAY DISTANCE INTERFACE 0 S 0.0.0.0/0 r 198.19.0.2 1

Re: losing a value after chomp()

2005-01-18 Thread RichT
Hi again, ok i made the changes sugested, but something is still wrong. the output im getting is -- interface is ATM0 interface is ATM0.38

Re: Is CYGWIN a unix like environment to run PERL modules?

2005-01-18 Thread Alfred Vahau
Hi, Bring up command prompt and run cygwin.bat in it. The contents of cygwin.bat should be [for my setup] @echo off C: chdir C:\cygwin\bin bash --login -i If you want the Linux GUI feel, then you need to load X-Windows. The cygwin URL is: http://www.cygwin.com/ alfred, Zapa Perl wrote: Hello, I

Re: regex needed

2005-01-18 Thread Randy W. Sims
Chris Knipe wrote: Lo everyone, Can someone please give me a regex to parse the following... Flags: X - disabled, I - invalid, D - dynamic, J - rejected, C - connect, S - static, r - rip, o - ospf, b - bgp #DST-ADDRESSG GATEWAY DISTANCE INTERFACE 0 S 0.0.0.0/0 r

Re: regex needed

2005-01-18 Thread Chris Knipe
Hi Randy, Ok thank you very much. This works :) The problem now, is that I have never before in my life worked with hashes... I have now looped the route list, and it is saved in the hash. Do I loop the hash again now (dumping all data) and then put in comparisions? I'm not 100% on how to

Re: losing a value after chomp()

2005-01-18 Thread Tor Hildrum
On Tue, 18 Jan 2005 13:22:14 +, RichT [EMAIL PROTECTED] wrote: Hi again, ok i made the changes sugested, but something is still wrong. the output im getting is -- interface is ATM0 interface is ATM0.38

linked list again.

2005-01-18 Thread Christian Stalp
Hello again, I still have some questions concerning the linked list. The problem now is, that I try to access the head-pointer of the list after I left the loop in which the list were made. #!/usr/bin/perl use warnings; use strict; use Data::Dumper; use constant NEXT = 0; use constant VAL =

Re: Dynamic pattern matching?

2005-01-18 Thread Dave Gray
I know I can write an if() clause to match every possible case, but I'm wondering if there is a more general approach that would allow me to dynamically match a varying number of extra columns within a single expression. You could shove all the data points into one parenthetical group in the

Re: Forcing script to run as root?

2005-01-18 Thread Randal L. Schwartz
Brian == Brian Barto [EMAIL PROTECTED] writes: Brian Hi all. How can I check, within a script, to see if it is being Brian run as root or not? I would like it to exit with an error Brian message if it is not running as root. die we need more power! if $; -- Randal L. Schwartz - Stonehenge

Re: losing a value after chomp()

2005-01-18 Thread RichT
On Tue, 18 Jan 2005 15:30:42 +0100, Tor Hildrum [EMAIL PROTECTED] wrote: On Tue, 18 Jan 2005 13:22:14 +, RichT [EMAIL PROTECTED] wrote: Hi again, ok i made the changes sugested, but something is still wrong. the output im getting is

dynamically calling a subroutine

2005-01-18 Thread Absolut Newbie
I have a program that generates a random number between 1 and 6. based on the outcome I want to run a subroutine that corresponds to the result. i.e if the result is 1 then the program should run sub F1. my question is how can I dynamically call the subroutine. i tried this but obviously it

Re: dynamically calling a subroutine

2005-01-18 Thread Stone
On Tue, 18 Jan 2005 20:05:01 +0200, Absolut Newbie [EMAIL PROTECTED] wrote: $var1(); # this is where it crashes You're looking for the eval command, which will read a string and evaluate the code it contains. ie: eval ( $var1() ); On on the other hand, you could do this with if statements.

RE: dynamically calling a subroutine

2005-01-18 Thread Moon, John
I have a program that generates a random number between 1 and 6. based on the outcome I want to run a subroutine that corresponds to the result. i.e if the result is 1 then the program should run sub F1. my question is how can I dynamically call the subroutine. i tried this but obviously it

Re: regex needed

2005-01-18 Thread John W. Krahn
Chris Knipe wrote: Lo everyone, Hello, Can someone please give me a regex to parse the following... Flags: X - disabled, I - invalid, D - dynamic, J - rejected, C - connect, S - static, r - rip, o - ospf, b - bgp #DST-ADDRESSG GATEWAY DISTANCE INTERFACE 0 S 0.0.0.0/0

RE: dynamically calling a subroutine

2005-01-18 Thread Bob Showalter
Absolut Newbie wrote: I have a program that generates a random number between 1 and 6. based on the outcome I want to run a subroutine that corresponds to the result. i.e if the result is 1 then the program should run sub F1. my question is how can I dynamically call the subroutine. i tried

Re: dynamically calling a subroutine

2005-01-18 Thread Ron Wingfield
- Original Message - From: Stone To: beginners@perl.org Sent: Tuesday, January 18, 2005 12:20 PM Subject: Re: dynamically calling a subroutine On Tue, 18 Jan 2005 20:05:01 +0200, Absolut Newbie [EMAIL PROTECTED] wrote: $var1(); # this is where it crashes You're

Re: dynamically calling a subroutine

2005-01-18 Thread John W. Krahn
Absolut Newbie wrote: I have a program that generates a random number between 1 and 6. based on the outcome I want to run a subroutine that corresponds to the result. i.e if the result is 1 then the program should run sub F1. my question is how can I dynamically call the subroutine. i tried this

Re: losing a value after chomp()

2005-01-18 Thread Tor Hildrum
On Tue, 18 Jan 2005 15:15:00 +, RichT [EMAIL PROTECTED] wrote: Grate that worked, the varible must of have a \r and a \n at the end. thank you very much... how would i find our what escape chars are in a varible? or is there a way to print out a string with out perl translating the

Re: dynamically calling a subroutine

2005-01-18 Thread JupiterHost.Net
Absolut Newbie wrote: I have a program that generates a random number between 1 and 6. based on the outcome I want to run a subroutine that corresponds to the result. i.e if the result is 1 then the program should run sub F1. my question is how can I dynamically call the subroutine. i tried this

Re: how to

2005-01-18 Thread Scott R. Godin
Juan Gomez wrote: Good day I am new to perl but I need a jump start to CGI so I have active perl 5.8.1 install in my pc Now a friend gave me a script that has a form and sends an email with the data Now in his pc its working fine but when I try it in my pc did not work Is there some

Re: beginners Digest 18 Jan 2005 12:52:35 -0000 Issue 2433

2005-01-18 Thread B McKee
Apologies for the layout and busted thread - I'm on digest mode From: JupiterHost.Net [EMAIL PROTECTED] I believe this will do what you want: next if grep { $rawreport_item =~ /$_/ } @possibleMatches; Just make sure the regexes in @possibleMatches are not user supplied or they may try sneaky

Neat Trick

2005-01-18 Thread Graeme St. Clair
Or I thought so anyway. Gurus are at liberty to think otherwise ;-) I just had to make a single form with 4 submit buttons (each with the same 'value' legend) out of 4 form's each with its own 'hidden' field. I used the following to distinguish between them:- my $request = defined

Dblib.so can't load shared object

2005-01-18 Thread Laxminarayana, Jayanth N
I am getting the following error when I try to run a perl script Can't load '/opt/perllib-5.8.2/sybperl/2.16-1251.EBF12107/auto/Sybase/DBlib/DBlib.so' for module Sybase::DBlib: /opt/perllib-5.8.2/sybperl/2.16-1251.EBF12107/auto/Sybase/DBlib/DBlib.so: cannot open shared object file: No such file

Re: beginners Digest 18 Jan 2005 12:52:35 -0000 Issue 2433

2005-01-18 Thread JupiterHost.Net
From: JupiterHost.Net [EMAIL PROTECTED] I believe this will do what you want: next if grep { $rawreport_item =~ /$_/ } @possibleMatches; Just make sure the regexes in @possibleMatches are not user supplied or they may try sneaky bad things :) yep - strictly hardcoded for this useage. perl

Perl print command from browser

2005-01-18 Thread Grant
On Gentoo Linux I have a printer that doesn't have a Linux driver, but I know how it can be printed to within a perl environment. The labels to be printed are images viewed within a web browser (firefox), and firefox lets you specify the exact command that prints. I'm not too familiar with

Retrieving data from telephone system.

2005-01-18 Thread Jason Balicki
I'm looking for some help with a little project that I've got going and I'm not a programmer. I can muddle my way through some things, but I've never started anything from scratch. The overview is that I am trying to get some accounting information from a phone system, and this phone system has a

Re: Perl print command from browser

2005-01-18 Thread Daniel Kasak
Grant wrote: On Gentoo Linux I have a printer that doesn't have a Linux driver, but I know how it can be printed to within a perl environment. The labels to be printed are images viewed within a web browser (firefox), and firefox lets you specify the exact command that prints. I'm not too

Re: Perl print command from browser

2005-01-18 Thread Grant
On Gentoo Linux I have a printer that doesn't have a Linux driver, but I know how it can be printed to within a perl environment. The labels to be printed are images viewed within a web browser (firefox), and firefox lets you specify the exact command that prints. I'm not too familiar

Re: Neat Trick

2005-01-18 Thread Jenda Krynicky
From: Graeme St. Clair [EMAIL PROTECTED] Or I thought so anyway. Gurus are at liberty to think otherwise ;-) I just had to make a single form with 4 submit buttons (each with the same 'value' legend) out of 4 form's each with its own 'hidden' field. I used the following to distinguish

RE: Neat Trick

2005-01-18 Thread Graeme St. Clair
Wow! I might just try these two for kicks, tho as nobody likely to inherit this from me is likely to be a Perl hand, I think I'll probably KISS for now. I don't necessarily disagree about '' vs qq{}. It's just that the rest of the code is styled with qq{}, and I thought it better to keep that

more format stuff

2005-01-18 Thread Hawkes, Mick I
Hi all, Before Christmas I had a thread going where I was trying to get pretty or neat formats in an email In the end someone kindly provided me with the following solution ( I can't find the post) formline 'FORM', $name, $age, $ID; NAME |AGE | ID NUMBER

RE: regex needed

2005-01-18 Thread Manav Mathur
Chris , cant get to you. 1) Use $RouteArray[2] instead of $RouteArray['2'] 2) POst me the 11th route entry |-Original Message- |From: Chris Knipe [mailto:[EMAIL PROTECTED] |Sent: Tuesday, January 18, 2005 7:55 PM |To: beginners@perl.org |Subject: Re: regex needed | | |Hi Randy, | |Ok

RE: regex needed

2005-01-18 Thread Manav Mathur
Ok Chris. I think I know why thats happening. Its because in some of your route entries, there's a space at the beginning whereas for some there aint such thing. try the following #!/usr/bin/perl my @RouteList = $Terminal-cmd(ip route print); foreach (@RouteList) { s/^\s*// ; chomp