Re: Script does not want to run, error

2003-03-05 Thread jdavis
On Wed, 2003-03-05 at 15:11, mel awaisi wrote: > Hi, > > I am having problems opening this script on my machine. i have been getting > help from a very helpful person on this list. > > I have checked the shebang line, that perl exists, and perl -v gives proper > output. > > i try to run the sc

truth test on a hash

2003-03-05 Thread jdavis
hello, I am trying to test a key from a hash in a hash the script gives me the desired result overall but i get the warning ... Use of uninitalized value in pattern match (m//) at ./passwd.pl line 26. could someone tell me why i get this error here is the code (this scrip looks at /etc/passwd and

looking for a better way, a perl way

2003-03-05 Thread Jerry Preston
Hi! I am looking for way to reduce the following code, a better way, a perl way. Any ideas? while ( my ( $Site, $Description, $Part_Number, $Part_Serial_Number, $Qty, $RMA_Number, $Customer_Contac, $RMA_Date, $Part_Rec ) = $sth->fetchrow()) { # while ( $data ) = $sth->fetchrow()) { $l =

Re: Module listing

2003-03-05 Thread Janek Schleicher
Rob Dixon wrote at Wed, 05 Mar 2003 18:28:36 +: > Rob wrote: >> Is there a perl command to list installed modules? > > This is a FAQ. Where can this FAQ be found ? I tried perldoc -q installed perldoc -q module perldoc -q list with Perl 5.8.0 Greetings, Janek -- To unsubscribe, e-mail: [

RE: cpan problems

2003-03-05 Thread Janek Schleicher
Dan Muey wrote at Wed, 05 Mar 2003 11:26:03 -0600: > I've also had trouble using CPAN and so I did the reload index > mentioned in this thread and that seemed to go thought but I s > til can't get it to go. > > It's the same error everytime ( diff module names of course ) :: could not open y...

Re: regex fun :)

2003-03-05 Thread John W. Krahn
Jdavis wrote: > > hello, Hello, > while trying to get a grasp on regex > i found this nice little tutorial. > http://www.steve.gb.com/perl/lesson06.html > > so i tried this.. > > $choice = 11 > if($choice =~ /[1-6]{1}/) [1-6]{1} is a more verbose way of saying [1-6]. {1} is implied with eve

Re: regular exp problem

2003-03-05 Thread Ramprasad
Rob Dixon wrote: Ramprasad wrote: I have a str that contains the base64 encoded string of a mail. Now this string should not contain any characters with ascii values above 128. Can i write a regex to check this Assuming you mean 'above 127' you can use the POSIX ASCII character class: die "I

Re: rename() doesn't work

2003-03-05 Thread Jeff Westman
I've had problems using rename() with ActivePerl under Windoze as well ... --- "R. Joseph Newton" <[EMAIL PROTECTED]> wrote: > Jeff Westman wrote: > > > Yes, I tried all that. (thanks) > > > > This is very odd... turns out that when I tried to do a regular 'mv' > command > > under Unix, it

Re: regex fun :)

2003-03-05 Thread Wiggins d'Anconia
jdavis wrote: hello, while trying to get a grasp on regex i found this nice little tutorial. http://www.steve.gb.com/perl/lesson06.html p.s. you may want to have a look at: perldoc perlretut perldoc perlre http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command

Re: regex fun :)

2003-03-05 Thread Wiggins d'Anconia
jdavis wrote: hello, while trying to get a grasp on regex i found this nice little tutorial. http://www.steve.gb.com/perl/lesson06.html so i tried this.. $choice = 11 if($choice =~ /[1-6]{1}/) this returns true. I want it to only match a single digit ranging 1-6 , I thought the {1} would speci

regex fun :)

2003-03-05 Thread jdavis
hello, while trying to get a grasp on regex i found this nice little tutorial. http://www.steve.gb.com/perl/lesson06.html so i tried this.. $choice = 11 if($choice =~ /[1-6]{1}/) this returns true. I want it to only match a single digit ranging 1-6 , I thought the {1} would specifiy to match o

Re: [OT] YAPC::NA 2003 Registration

2003-03-05 Thread George Schlossnagle
On Wednesday, March 5, 2003, at 08:49 PM, R. Joseph Newton wrote: Kevin Meltzer wrote: It will be June 16-18, 2003 in Boca Raton, FL. Please visit the website to learn more, and _to register_. If anyone has any questions, feel free to email me off-list Eh, which website? I didn't see a link. F

Re: [OT] YAPC::NA 2003 Registration

2003-03-05 Thread R. Joseph Newton
Kevin Meltzer wrote: > Hello folks, > > ... > It will be June 16-18, 2003 in Boca Raton, FL. Please visit the website > to learn more, and _to register_. If anyone has any questions, feel > free to email me off-list. > > Cheers, > Kevin Eh, which website? I didn't see a link. FWIW, yas.org [my

Re: rename() doesn't work

2003-03-05 Thread R. Joseph Newton
Jeff Westman wrote: > Yes, I tried all that. (thanks) > > This is very odd... turns out that when I tried to do a regular 'mv' command > under Unix, it too said "success" ($?=0) I found that the mount I have > my file system is non-standard Unix, so while the OS thought everything was >

[OT] YAPC::NA 2003 Registration

2003-03-05 Thread Kevin Meltzer
Hello folks, I just wanted to alert people to the fact that registration has begun for YAPC::NA::2003. The Yet Another Perl Conferences (YAPCs) are grassroots symposia on the Perl programming language under the auspices of the Yet Another Society (YAS), a non-profit corporation for the advanceme

Re: rename() doesn't work

2003-03-05 Thread Jeff Westman
Yes, I tried all that. (thanks) This is very odd... turns out that when I tried to do a regular 'mv' command under Unix, it too said "success" ($?=0) I found that the mount I have my file system is non-standard Unix, so while the OS thought everything was okay, it really wasn't. I'm usi

Re: rename() doesn't work

2003-03-05 Thread R. Joseph Newton
Jeff Westman wrote: > Why doesn't my rename() work? It is returning a '1', meaning success (I get > the "has been modified" message below. Yet when I list the files (ls), it > shows the original file name and my tmp file name. The rename doesn't seem > to work. > > Any ideas?! > > >

Re: Script does not want to run, error

2003-03-05 Thread Mark G
Make sure your script starts with #!/path/to/perl then change permission of the script, chmod 755 file_to_set try to run your script, if it doesnt work try #perl file_to_run Mark - Original Message - From: "mel awaisi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 0

RE: Script does not want to run, error

2003-03-05 Thread Dan Muey
Try # ./renamer.pl How do you know it's not running? It could be running but not printing anything to the screen? Is it supposed to have output? What is it supposed to do? Throw us bone here!! DMuey > Hi, > > I am having problems opening this script on my machine. i > have been getting >

Re: Script does not want to run, error

2003-03-05 Thread John W. Krahn
Mel Awaisi wrote: > > Hi, Hello, > I am having problems opening this script on my machine. i have been getting > help from a very helpful person on this list. > > I have checked the shebang line, that perl exists, and perl -v gives proper > output. > > i try to run the script below as follow:

RE: Can't fork using open

2003-03-05 Thread Smith Jeff D
That was what I found out and why I chose to use Win32::Process so that interactive sessions/commands could be spawned without leaving the Perl module in the lurch. Try it, you'll like it. -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 4:09

RE: How to look into every subdirectory

2003-03-05 Thread Dan Muey
I had so much fun doing that that I did one that did a little more : Try this it's a little creamier since it uses tags instead of • And it lists files in the directories that are in the directory in $dir :: I better stop now or I'll be messing with this all night! !#/usr/bin/perl use warnings

RE: cpan problems

2003-03-05 Thread Dan Muey
> I've also had trouble using CPAN and so I did the reload index > mentioned in this thread and that seemed to go thought but I > s til can't get it to go. > > It's the same error everytime ( diff module names of course ) > :: could not open y... There is a direct perl -MCAPN =e shell; > CPAN

RE: using ParseExcel::Simple to get worksheet name

2003-03-05 Thread Dan Muey
> thanks, dan. while sometimes you can get away with not > understanding something, in my case,hashes--sometimes you > just have to face them head-on. Amen to that > > thanks for your time in addressing my problem. No problem I hope it helped, I may need help with that module someday Too so

RE: rename() doesn't work

2003-03-05 Thread Dan Muey
> Why doesn't my rename() work? It is returning a '1', meaning > success (I get the "has been modified" message below. Yet > when I list the files (ls), it shows the original file name > and my tmp file name. The rename doesn't seem to work. > > Any ideas?! Any of this apply?? perldoc -f r

Tk grab flaws (Is this normal)

2003-03-05 Thread Voodoo Raja
I find it pretty strange that after I hit a button from the main window the grab is released and passed on to the next sub routine.. stepping a value to or rather changing a value.. after I em done with that sub .. I again call grab on the top level window and there it it goes with the grab ..

Re: Managing the backslash in a string

2003-03-05 Thread R. Joseph Newton
Guy P wrote: > Look at the small program below. > The result is this: DirectionsNitprogrsourcsql > DirectionsNitprogrsourcsql > > And I would like it to be this:\Directions\unit\progr\sourcsql ... > > $reprt= "\Directions\unit\progr\sourcsql"; ...Hi Guy

rename() doesn't work

2003-03-05 Thread Jeff Westman
Why doesn't my rename() work? It is returning a '1', meaning success (I get the "has been modified" message below. Yet when I list the files (ls), it shows the original file name and my tmp file name. The rename doesn't seem to work. Any ideas?! close(IN) or warn "cannot close fi

Script does not want to run, error

2003-03-05 Thread mel awaisi
Hi, I am having problems opening this script on my machine. i have been getting help from a very helpful person on this list. I have checked the shebang line, that perl exists, and perl -v gives proper output. i try to run the script below as follow: [EMAIL PROTECTED] httpd]# cd cgi-bin [EMAI

net-whois

2003-03-05 Thread Thomas Browner
Can some on tell me where I can find doc on net-whois mod or example script that I can look at. Thomas

RE: Can't fork using open

2003-03-05 Thread Kipp, James
> That was what I found out and why I chose to use > Win32::Process so that > interactive sessions/commands could be spawned without > leaving the Perl > module in the lurch. Try it, you'll like it. > yes i have used that module in the past as well. I was just trying to see if it could be do

RE: using ParseExcel::Simple to get worksheet name

2003-03-05 Thread Dan Muey
> im trying to use Spreadsheet::ParseExcel::Simple to return > the name of the worksheet. but all i get is something such as: > Spreadsheet::ParseExcel::Simple::_Sheet=HASH(0x39b8918) > > what am i doing wrong? It's returning a reference to a hash it looks like. I've never used that module so I

RE: How to look into every subdirectory

2003-03-05 Thread Dan Muey
> I need to make an HTML page that lists all files and > directories and then links to them. The following script, > with a subroutine, looks like what I need. I should just > need to add some html tags to the Print statements. > > Does that sound right to you all? Or do you have better > sug

RE: Can't fork using open

2003-03-05 Thread Kipp, James
> > I just test ran the below and it worked fine. I am running > Win2k Pro, AS Perl 5.6.1 build 630: > code adapted from the perlipd doc > -- > $parent = $$; > print "parent: $parent\n"; > $pid = open(STATUS, "netstat -an 2>&1 |") || die "can't fork: $!"; > while () { > #next if /^(tcp|

RE: using ParseExcel::Simple to get worksheet name

2003-03-05 Thread Wagner, David --- Senior Programmer Analyst --- WGO
[EMAIL PROTECTED] wrote: > im trying to use Spreadsheet::ParseExcel::Simple to return the name > of the worksheet. > but all i get is something such as: > Spreadsheet::ParseExcel::Simple::_Sheet=HASH(0x39b8918) > > what am i doing wrong? > > code: > > use strict; > use Spreadsheet::ParseExcel::S

Can't fork using open

2003-03-05 Thread Smith Jeff D
I've used Win32::Process to do what you're trying to do-esp. when I wanted a process to go off and do it's thing independently, then return immediately to the calling Perl module for other functions and housekeeping. Backticking and system calls didn't do what I wanted to do, esp. when the forked

Help with File Handle --thanks

2003-03-05 Thread Smith Jeff D
I thank those who have answered my request--let me see if I can summarize the recommendations: David Wagner recommended that I reform the call using "cp": . "use File::Copy cp; $n=FileHandle->new("/dev/null","r"); cp($n,"x");' which is not what you are trying.

RE: How to look into every subdirectory

2003-03-05 Thread Scott, Deborah
I need to make an HTML page that lists all files and directories and then links to them. The following script, with a subroutine, looks like what I need. I should just need to add some html tags to the Print statements. Does that sound right to you all? Or do you have better suggestions? (I'm a r

RE: Can't fork using open

2003-03-05 Thread Kipp, James
> > > > No, but given that a lot of work has been put into ithreads in V5.8 > > to make threading platform-independent (or at least functional on > > Windows) I'm surprised that a language feature like this hasn't been > > implemented. As well as that I can see nowhere in the docs > > where it men

Re: Can't fork using open

2003-03-05 Thread david
Vyacheslav Nadvorny wrote: > I tried to run perlopentut example for STDOUT processing > but got just this: > > =Beginning of the citation== > '-' is not recognized as an internal or external command, > operable program or batch file. > > =The end of the citation==

Re: perl program control -- wvdial

2003-03-05 Thread jdavis
On Wed, 2003-03-05 at 07:19, zentara wrote: > On 04 Mar 2003 22:58:20 -0700, [EMAIL PROTECTED] (Jdavis) wrote: > > >Hello, > > I am writing a script to help a user turn a modem > >on and off and adjust the routing tables on a > >Linux box. I am trying to call wvdial to do the dialing, > >but it

Re: using ParseExcel::Simple to get worksheet name

2003-03-05 Thread Frank Wiles
.--[ [EMAIL PROTECTED] wrote (2003/03/05 at 11:21:20) ]-- | | im trying to use Spreadsheet::ParseExcel::Simple to return the name of the | worksheet. | but all i get is something such as: | Spreadsheet::ParseExcel::Simple::_Sheet=HASH(0x39b8918) | | what am i doing wrong? |

using ParseExcel::Simple to get worksheet name

2003-03-05 Thread aquinonez
im trying to use Spreadsheet::ParseExcel::Simple to return the name of the worksheet. but all i get is something such as: Spreadsheet::ParseExcel::Simple::_Sheet=HASH(0x39b8918) what am i doing wrong? code: use strict; use Spreadsheet::ParseExcel::Simple; my $wkbook = "x:/traffic/temp_assay/site

RE: Can't fork using open

2003-03-05 Thread Kipp, James
> > Not sure if you got an answer to this, but you can not fork opens in > > Win32 does not work like unix. > > No, but given that a lot of work has been put into ithreads in V5.8 > to make threading platform-independent (or at least functional on > Windows) I'm surprised that a language feature l

Re: single line condition statement with semicolon

2003-03-05 Thread Rob Dixon
Dan Muey wrote: > > $m = $_[1] ? $_[1] : 'text/plain'; > Excellent!! I also received the suggestion > my $m = $_[1] || 'text/plain'; > > Any body have any pros/cons about which would be more > efficient/better ?? I second Rob H's version - the second one - as being more Perlish. It also avoids re

RE: Module listing

2003-03-05 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Rob Dixon wrote: > Rob wrote: >> Is there a perl command to list installed modules? > > This is a FAQ. > > As far as I'm concerned, by far the best way is to use > ExtUtils::Installed like this: > > use ExtUtils::Installed; > print "$_\n" foreach ExtUtils::Installed->new->modules; > > w

RE: Module listing

2003-03-05 Thread Dan Muey
Or for a really quick and dirty list :: perl -e 'use ExtUtils::Installed;for (ExtUtils::Installed->new()->modules()){print "$_ \n";}' DMuey > -Original Message- > From: John Mooney [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 11:55 AM > To: [EMAIL PROTECTED]; [EMAIL PROT

Re: Module listing

2003-03-05 Thread Rob Dixon
Rob wrote: > Is there a perl command to list installed modules? This is a FAQ. As far as I'm concerned, by far the best way is to use ExtUtils::Installed like this: use ExtUtils::Installed; print "$_\n" foreach ExtUtils::Installed->new->modules; which does a lot more than just list the

RE: removing elements from an array

2003-03-05 Thread Bakken, Luke
> > > I would like to remove elements from an array that are eq to > > > string '0' > > > The following does not work, can someone shed some light on > > > the proper > > > way to do this. > > > Thanks! > > > Dave G. Here's an interesting benchmark comparing the splice, new list, and grep (grep

Re: Module listing

2003-03-05 Thread John Mooney
use ExtUtils::Installed; my $instmod = ExtUtils::Installed->new(); foreach my $module ($instmod->modules()) { my $version = $instmod->version($module) || "???"; print " $module -- $version\n"; } >>> "Rob" <[EMAIL PROTECTED]> 3/5/2003 9:36:01 AM >>> Is there a per

RE: removing elements from an array

2003-03-05 Thread Bakken, Luke
> > I would like to remove elements from an array that are eq to > > string '0' > > The following does not work, can someone shed some light on > > the proper > > way to do this. > > Thanks! > > Dave G. > > > > #!/usr/bin/perl -w > > > > @bag_quantity = ( '0', 1, '0', '0', '0', '0', '0', '0',

Re: removing elements from an array

2003-03-05 Thread Deb
Why not use a foreach, test the element, then undef it when found? Or, use foreach, test the element, if != '0', then push it onto another array? David Gilden <[EMAIL PROTECTED]> had this to say, > Hi, > I would like to remove elements from an array that are eq to string '0' > The following d

Re: Backslash in a string

2003-03-05 Thread david
Guy P wrote: > The problem still remains. Look at the small program below. > The result is this: DirectionsNitprogrsourcsql > DirectionsNitprogrsourcsql > > And I would like it to be this:\Directions\unit\progr\sourcsql > > .Directions.unit.progr.sourcsq

Re: Can't fork using open

2003-03-05 Thread Rob Dixon
James Kipp wrote: > > =Beginning of the citation== > > '-' is not recognized as an internal or external command, > > operable program or batch file. > > > > =The end of the citation > > > > I use windows xp, activestate perl build 804. > > > > Can anyone

RE: removing elements from an array

2003-03-05 Thread Bakken, Luke
> I would like to remove elements from an array that are eq to > string '0' > The following does not work, can someone shed some light on > the proper > way to do this. > Thanks! > Dave G. > > #!/usr/bin/perl -w > > @bag_quantity = ( '0', 1, '0', '0', '0', '0', '0', '0', '0' ); > for (@bag_qu

RE: removing elements from an array

2003-03-05 Thread Timothy Johnson
You don't want to use shift in the middle of a for or foreach. shift removes the first element of the array, and you're just asking for trouble mucking with the structure of an array as you're cycling through it. delete() won't work either, as it pretty much just marks the element as undef and do

RE: removing elements from an array

2003-03-05 Thread Mark Anderson
> Hi, > I would like to remove elements from an array that are eq to string '0' > The following does not work, can someone shed some light on the proper > way to do this. > Thanks! > Dave G. look at the grep function: perldoc -f grep -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

removing elements from an array

2003-03-05 Thread David Gilden
Hi, I would like to remove elements from an array that are eq to string '0' The following does not work, can someone shed some light on the proper way to do this. Thanks! Dave G. #!/usr/bin/perl -w @bag_quantity = ( '0', 1, '0', '0', '0', '0', '0', '0', '0' ); for (@bag_quantity){ shift if $_

RE: cpan problems

2003-03-05 Thread Dan Muey
I've also had trouble using CPAN and so I did the reload index mentioned in this thread and that seemed to go thought but I s til can't get it to go. It's the same error everytime ( diff module names of course ) :: could not open y... There is a direct perl -MCAPN =e shell; CPAN> install Bundel::

RE: single line condition statement with semicolon

2003-03-05 Thread Dan Muey
> > $m = $_[1] unless(!$_[1]); > > This is scary itself, a double negative unless is a bit > confusing. "if" would have been better I think. Good point > > > I want to do a one liner > > my $m = $_[1] || 'text/plain'; Oh!! I never thought of using || for an assignment. Sweet idea. Thanks D

RE: single line condition statement with semicolon

2003-03-05 Thread Dan Muey
> > $m = 'text/plain'; > > $m = $_[1] unless(!$_[1]); > > > > Somehting like > > > > $m = $_[1] unless(!$_[1]) :$m = 'text/plain'; > > > > But I can get it right, any assistance would be much appreciated. > > > > Thanks > > > > Dan > > > > $m = $_[1] ? $_[1] : 'text/plain'; Excellent!! I a

RE: single line condition statement with semicolon

2003-03-05 Thread Beau E. Cox
Hi - > -Original Message- > From: Dan Muey [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 6:33 AM > To: [EMAIL PROTECTED] > Subject: single line condition statement with semicolon > > > Hello > > > What I want to do is assign the value of $_[1] to $m unless it's > empty

Re: cpan problems

2003-03-05 Thread Paul Johnson
Deb said: >> You might try blowing away your .cpan and reconfiguring, who knows. > > Thought about that, but I'd rather solve the problem of updating the > filelist > information, and work through this. Even more radical, you might want to make the jump to CPANPLUS. CPANPLUS will eventually rep

Re: single line condition statement with semicolon

2003-03-05 Thread Lance
I think something like: if( $_[1] ) ? $m = $_[1] : $m ='text/plain'; might work. Try looking up the perl 'trinary' operator. "Dan Muey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] com... Hello What I want to do is assign the value of $_[1] to $m unless it's empty then assign

Re: cpan problems

2003-03-05 Thread Deb
Casey West <[EMAIL PROTECTED]> had this to say, > Sounds like you need to update your CPAN index. Should solve all your > problems. Use the 'reload index' command first. Also, you should > consider using CPANPLUS (with the cpanp shell utility), it's the "next > generation" CPAN interface. Ahhh

RE: single line condition statement with semicolon

2003-03-05 Thread Hanson, Rob
> $m = $_[1] unless(!$_[1]); This is scary itself, a double negative unless is a bit confusing. "if" would have been better I think. > I want to do a one liner my $m = $_[1] || 'text/plain'; You can have as many conditions as you want, the first that is "true" (not blank, zero or undef) will b

Re: cpan problems

2003-03-05 Thread Casey West
It was Wednesday, March 05, 2003 when Deb took the soap box, saying: : Sometimes I really hate using cpan. It's 'help' isn't much. It's been since : last october that I touched my cpan stuff, and now it's out of date. It's : currently at v1.60. I wanted to upgrade, so I did a "make Bundle::CPAN

Re: cpan problems

2003-03-05 Thread Deb
[EMAIL PROTECTED] <[EMAIL PROTECTED]> had this to say, > > I wonder if the fact that you are using 'make' instead of 'install' is causing this > problem. It might only try and make the last version it knew about, rather than > looking to see what the newest version is. Try doing "install Bundl

RE: cpan problems

2003-03-05 Thread wiggins
On Wed, 5 Mar 2003 08:25:30 -0800, Deb <[EMAIL PROTECTED]> wrote: > Sometimes I really hate using cpan. It's 'help' isn't much. It's been since > last october that I touched my cpan stuff, and now it's out of date. It's > currently at v1.60. I

single line condition statement with semicolon

2003-03-05 Thread Dan Muey
Hello What I want to do is assign the value of $_[1] to $m unless it's empty then assign it 'text/plain' This currently works but I want to do a one liner I think you can do that with a colon but I can't seem to find the syntax $m = 'text/plain'; $m = $_[1] unless(!$_[1]); Somehting like $m

cpan problems

2003-03-05 Thread Deb
Sometimes I really hate using cpan. It's 'help' isn't much. It's been since last october that I touched my cpan stuff, and now it's out of date. It's currently at v1.60. I wanted to upgrade, so I did a "make Bundle::CPAN", which is supposed to do a get first. BUT, my cpan thinks that it needs

RE: Managing the backslash in a string

2003-03-05 Thread Bakken, Luke
> ## > #!/usr/bin/perl > my ($reprt); > $reprt= "\Directions\unit\progr\sourcsql"; > > print $reprt."\n"; > > # $reprt =~ s/\\//g; > $reprt =~ s/[\\]/\./g; > > print $reprt."\n"; my $reprt= '\Directions\unit\progr\sourcsql'; print $rep

Re: script to mimic the cusor movement on a terminer or shell

2003-03-05 Thread Danny Faught
Automating interactive programs take some extra work. Does the program accept input immediately after it starts, or do you need to wait until the screen is drawn? I cut my teeth on this sort of thing using expect/tcl, and it looks like there are Perl modules that can also let you do sent/expec

RE: Can't fork using open

2003-03-05 Thread Kipp, James
> > =Beginning of the citation== > '-' is not recognized as an internal or external command, > operable program or batch file. > > =The end of the citation > > I use windows xp, activestate perl build 804. > > Can anyone explain why I'm getting this e

Re: Backslash in a string

2003-03-05 Thread wiggins
On Wed, 5 Mar 2003 10:02:17 -0500, "Guy P" <[EMAIL PROTECTED]> wrote: > The problem still remains. Look at the small program below. > The result is this: DirectionsNitprogrsourcsql > DirectionsNitprogrsourcsql

RE: Module listing

2003-03-05 Thread Bakken, Luke
You can use the find command to find all of the .pm files in the INC dirs listed with perl -V. Do you need to check somehow if a module is installed before running a script? This should work to check in your script: eval { require foo.pm; import foo.pm; } if ($@) { die "

RE: Module listing

2003-03-05 Thread wiggins
On Wed, 5 Mar 2003 09:36:01 -0500, "Rob" <[EMAIL PROTECTED]> wrote: > Is there a perl command to list installed modules? > > on Unix: find `perl -e 'print "@INC";'` -name "*.pm" -print Gleaned from a doc, perldoc perlmodlib. I alias this like

Re: Managing the backslash in a string

2003-03-05 Thread Guy P
Look at the small program below. The result is this: DirectionsNitprogrsourcsql DirectionsNitprogrsourcsql And I would like it to be this:\Directions\unit\progr\sourcsql .Directions.unit.progr.sourcsql Notice that it doesn't print the backslashes and it

Re: Backslash in a string

2003-03-05 Thread Guy P
The problem still remains. Look at the small program below. The result is this: DirectionsNitprogrsourcsql DirectionsNitprogrsourcsql And I would like it to be this:\Directions\unit\progr\sourcsql .Directions.unit.progr.sourcsql Notice that it doesn't pr

Module listing

2003-03-05 Thread Rob
Is there a perl command to list installed modules? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Delivering Graphics over HTTP

2003-03-05 Thread Dan Muey
I get it in IE 5.0 ok also Netscape 7.01 > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 7:33 AM > To: Nigel Peck - MIS Web Design; Dan Muey; [EMAIL PROTECTED] > Subject: RE: Delivering Graphics over HTTP > > > > --

RE: DBI and getting values from the DB

2003-03-05 Thread NYIMI Jose (BMB)
Not a OT but there is a good maillist specially for dbi users at http://lists.perl.org/showlist.cgi?name=dbi-users Anyway try this: [snippet of your code with some modif] #The CGI.pm module will take input from the form. use CGI qw(:standard ); my $name=param("name"); #Connecting to DB my $dbh

Re: perl program control -- wvdial

2003-03-05 Thread zentara
On 04 Mar 2003 22:58:20 -0700, [EMAIL PROTECTED] (Jdavis) wrote: >Hello, > I am writing a script to help a user turn a modem >on and off and adjust the routing tables on a >Linux box. I am trying to call wvdial to do the dialing, >but it does not give control back to my script. I call >it like s

DBI and getting values from the DB

2003-03-05 Thread Tony Bandy
Hello everyone, Please forgive in advance if this has already been posted...fairly new to the list as have only been on it a week. At this point I only get the digest, but just sent an email to subscribe to the full list. I'm running apache 2.0x with mod_perl on a windows 2000 server. I have a

RE: Delivering Graphics over HTTP

2003-03-05 Thread wiggins
On Wed, 5 Mar 2003 12:39:18 -, "Nigel Peck - MIS Web Design" <[EMAIL PROTECTED]> wrote: > I've done as suggested and it works fine in Mozilla but IE won't display the > image: > > http://cgi.www.miswebdesign.com/cgi-bin/www.miswebdesign.com/l

Re: regular exp problem

2003-03-05 Thread Rob Dixon
Ramprasad wrote: > I have a str that contains the base64 encoded string of a mail. Now > this string should not contain any characters with ascii values above > 128. Can i write a regex to check this Assuming you mean 'above 127' you can use the POSIX ASCII character class: die "Invalid chara

Re: Simple Regex Problem.

2003-03-05 Thread Rob Dixon
Paul Johnson wrote: > Rob Dixon said: > > > $data =~ m/ <([^>]*)> /x; > > my $newdata = $1; > > And if the match fails? Well I think it's likely that you'd want to do: $data =~ m/ <([^>]*)> /x or die "Malformed data"; or at least: $data =~ m/ <([^>]*)> /x or next; as a mismatch

Re: not able to set repository

2003-03-05 Thread Pradeep Goel
its 3.0.1 & perl is 5.8 & my time is quite bad these days :) Thanks & regards Pradeep - Original Message - From: "Rob Dixon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, March 05, 2003 6:10 PM Subject: Re: not able to set repository > > ppm> set repository RothCon

Re: Simple Regex Problem.

2003-03-05 Thread Paul Johnson
Rob Dixon said: > $data =~ m/ <([^>]*)> /x; > my $newdata = $1; And if the match fails? -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: not able to set repository

2003-03-05 Thread Rob Dixon
Pradeep Goel wrote: > Hi All > I am having a problem in setting the repository - can somebody tell > me the reason . > > ppm> set repository > Unknown or ambiguous setting 'repository'. See 'help settings'. > > > ppm> set repository RothConsulting http://www.roth.net/perl/packages > Unknown or ambi

RE: Delivering Graphics over HTTP

2003-03-05 Thread Nigel Peck - MIS Web Design
I've done as suggested and it works fine in Mozilla but IE won't display the image: http://cgi.www.miswebdesign.com/cgi-bin/www.miswebdesign.com/logo.pl?image=l ogo Any ideas? Cheers, Nigel Script: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--=-=-= #!/bin/perl5.6.0 use CGI; use File::Slurp; my

Re: perl program control -- wvdial

2003-03-05 Thread Rob Dixon
Jdavis wrote: > Hello, > I am writing a script to help a user turn a modem > on and off and adjust the routing tables on a > Linux box. I am trying to call wvdial to do the dialing, > but it does not give control back to my script. I call > it like so > > if( $choice == 1){ > `wvdial`; > print "c

regular exp problem

2003-03-05 Thread Ramprasad
I have a str that contains the base64 encoded string of a mail. Now this string should not contain any characters with ascii values above 128. Can i write a regex to check this thanks ram -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: perl program control -- wvdial

2003-03-05 Thread LaVei
Jdavis wrote: > > Hello, Hello! > if( $choice == 1){ > `wvdial`; > print "connected"; > } > > I also have tried.. > > if( $choice == 1){ > `wvdial&`; > } > > but nothing after `wvdial` gets ran. > could someone offer me some advice...please :) ? try: if( $choice == 1) {

Re: Simple Regex Problem.

2003-03-05 Thread Rob Dixon
David --- Senior Programmer Analyst --- Wgo Wagner wrote: > I had to change as follows: > my $data = 'BlahBlahBlahBlah From: BlahsvilleDude > <[EMAIL PROTECTED]>BlahBBlahBBlah'; > > printf "bf:%-s\n", $data; > > $data =~ s/^.*<([^>]*)>.*$/$1/gs; > > printf "af:%-s\n", $data; > > but it does work t

Can't fork using open

2003-03-05 Thread Vyacheslav Nadvorny
I tried to run perlopentut example for STDOUT processing but got just this: =Beginning of the citation== '-' is not recognized as an internal or external command, operable program or batch file. =The end of the citation I use windows xp, activestate pe

RE: Simple script requires simple soulution

2003-03-05 Thread Scott R. Godin
Aimal Pashtoonmal wrote: > Hello, > > I have the script below giving the folowing error meesages. > > =>Useless use of string in void context at > extract_data_from_IPR_HMM_libs.pl > line 12. > =>Useless use of a constant in void context at > extract_data_from_IPR_HMM_libs.pl lin

Re: Simple Regex Problem.

2003-03-05 Thread Rob Dixon
Rob Hanson wrote: > Try this... > > my $data = "BlahBlahBlahBlah From: BlahsvilleDude > <[EMAIL PROTECTED]>BlahBBlahBBlah" > $data =~ s/^.*<([^>]*)>.*$/$1/; Hi Rob. Anchoring the search at the start of the string and then allowing 'any number of anything' is the same as not anchoring it! Likewis

not able to set repository

2003-03-05 Thread Pradeep Goel
Hi All I am having a problem in setting the repository - can somebody tell me the reason . ppm> set repository Unknown or ambiguous setting 'repository'. See 'help settings'. ppm> set repository RothConsulting http://www.roth.net/perl/packages Unknown or ambiguous setting 'repository'. See 'hel

PowerBuilder and Perl

2003-03-05 Thread NYIMI Jose (BMB)
Hello, I have following architecture: Client:PowerBuilder8 client on Windows2000 (Perl not installed) : almost 200 users. Business:Perl script on Sun Solaris (no Web Server, no Application Server, just a perl script :) ). RDBMS: Oracle Requirements: - Asynchronous communication between "pb clie

  1   2   >