readir

2003-06-19 Thread Ronen Kfir
Hi, I want to use readdir to read a directory tree & find a certain file, which might be present in many subdirectories (this file will be a trigger to continue of the process). Then I want to define a few variables respectively to the number of files found in readir that will define the path of

Using socket in perl

2003-06-19 Thread Xavier Ambrosioni
Hello all, I'm writing a server and a client in perl. My client communicates with the server using sockets. I'm using IO::Socket::INET to create the sockets. My problem is that when my client close the socket, the expressions "while ($line = <$client>)" is an infinite loop and $line contains "\n";

Re: Accessing C/C++ Dlls using perl

2003-06-19 Thread Ben Crane
Beau, Thanx, I hunting the info down now, seems quite complex. I'm wondering whether it might not be better to have a crack at this in C? Have you found perlXS to be difficult to implement? Ben __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://s

pb with acsii codes

2003-06-19 Thread f.collineau
Greetings, I have a email text where some character are convert in ascii hexa code. Example: character "=" is "=3D" in the text. Is there a module or fonction which convert hexa ascii code in charcater ? Thanks Franck __ GNU Linux Mandrake 9.1 -

Re: Mapping network drives with perl on win2k

2003-06-19 Thread Jenda Krynicky
From: Jensen Kenneth B SrA AFPC/DPDMPQ <[EMAIL PROTECTED]> > I have written a script which I would like to set up as an 'at' job on > windows 2000. The script transfers files from a remote UNIX server and > places them on a mapped network drive. My problem is that when the at > job runs it does not

Re: Accessing C/C++ Dlls using perl

2003-06-19 Thread Tassilo von Parseval
On Thu, Jun 19, 2003 at 01:37:09AM -0700 Ben Crane wrote: > Thanx, I hunting the info down now, seems quite > complex. I'm wondering whether it might not be better > to have a crack at this in C? The difference between doing XS in C and in C++ isn't all that rough. See "Using XS With C++" in per

Re: Accessing C/C++ Dlls using perl

2003-06-19 Thread Jenda Krynicky
From: Ben Crane <[EMAIL PROTECTED]> > I've tried this question in a forum dedicated to MITAB > dlls (it's a series of c/c++ libraries designed to > access MapInfo data) to no avail. My question is: > > can you access and use c/c++ dll's in perl?? At the > moment, I have a MapBasic script pulling i

string concatenation

2003-06-19 Thread Miguel Angel Morales
Hi All! I have a problem concatenating strings and I will be very grateful if you could help me because I'm going crazy: I'm using the telnet library for connecting to a router and executing the following command: $t->cmd("ip $nombre $servidor -prefix_len 126 -destination_ip_address $cliente -con

Re: string concatenation

2003-06-19 Thread Jenda Krynicky
From: "Miguel Angel Morales" <[EMAIL PROTECTED]> > Hi All! I have a problem concatenating strings and I will be very > grateful if you could help me because I'm going crazy: > > I'm using the telnet library for connecting to a router and executing > the following command: > > $t->cmd("ip $nombre

Re: Accessing C/C++ Dlls using perl

2003-06-19 Thread Beau E. Cox
- Original Message - From: "Ben Crane" <[EMAIL PROTECTED]> To: "Beau E. Cox" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, June 18, 2003 10:37 PM Subject: Re: Accessing C/C++ Dlls using perl > Beau, > > Thanx, I hunting the info down now, seems quite > complex. I'm wonde

Re: Accessing C/C++ Dlls using perl

2003-06-19 Thread Beau E. Cox
- Original Message - From: "Ben Crane" <[EMAIL PROTECTED]> To: "Beau E. Cox" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Wednesday, June 18, 2003 10:37 PM Subject: Re: Accessing C/C++ Dlls using perl > Beau, > > Thanx, I hunting the info down now, seems quite > complex. I'm wonde

[ANNOUNCE] 5.5.7 Image::Magick Windows ppm for Perl 5.8

2003-06-19 Thread Beau E. Cox
I have recently built and tested Image::Magick module for Windows ActiveState Perl 5.8.0 builds 804 and higher. This module is built on ImageMagick version 5.5.7. Details and full instructions are available at: http://ppm.beaucox.com Aloha => Beau; -- To unsubscribe, e-mail: [EMAIL PROTECTED]

Re: mathing only one type of characters

2003-06-19 Thread Kevin Pfeiffer
In article <[EMAIL PROTECTED]>, Janek Schleicher wrote: > Pedro Antonio Reche wrote at Wed, 11 Jun 2003 13:38:18 -0500: > >> I would like to match a string if it has only cero or more of a defined >> set of characters. >> For example: >> if "GACT" are the characters, then >> >> GACTNGACT ## T

Re: string concatenation

2003-06-19 Thread Miguel Angel Morales
Thank you very much Jenda, I used the code > $hex = unpack('H*', $servidor); > $hex =~ s/(..)/$1 /g; > print $hex; you send me and at the end of the register appears the 0D 0A hex characters, so this should be the problem. How can I remove this characters from the variable? Thanks again, Miguel

Re: Accessing C/C++ Dlls using perl

2003-06-19 Thread Ben Crane
Thanx all, I might need to come back to you guys at a later date if I have problems. I'm going through the docs now and trying to put together a very simple example to play with... Thanx for the advice. I might go through with perl after all since it would be more useful when putting data stripp

Re: pb with acsii codes

2003-06-19 Thread Jenda Krynicky
From: "f.collineau" <[EMAIL PROTECTED]> > Greetings, > > I have a email text where some character are convert in ascii hexa > code. Example: character "=" is "=3D" in the text. Is there a module > or fonction which convert hexa ascii code in charcater ? Thanks This is the quoted-printable encod

Re: string concatenation

2003-06-19 Thread Jenda Krynicky
From: "Miguel Angel Morales" <[EMAIL PROTECTED]> > Thank you very much Jenda, I used the code > > > $hex = unpack('H*', $servidor); > > $hex =~ s/(..)/$1 /g; > > print $hex; > > you send me and at the end of the register appears the 0D 0A hex > characters, so this should be the problem. How can I

Re: Win32::OLE

2003-06-19 Thread Jenda Krynicky
From: "Shishir K. Singh" <[EMAIL PROTECTED]> > I am trying to run simple script that tries to parse an XLS file. The > script name is x.pl and the xls file that it tries to open is x.xls > and they both exist in the same directory. Always use absolute paths with OLE. The working directory of the

Re: h2xs works fine: can't find new module though?

2003-06-19 Thread Ben Crane
Hey all, Followed the instructions for using h2xs and everything seems okay. Problem is, when I try running the simple hello world script it crashes with the error: can't locate loadable object for module mytest in @inc (@inc contains: blib/arch blib/lib c:/perl/lib c:/perl/site/lib.) at hello.pl

Re: html files for ppms

2003-06-19 Thread Beau E. Cox
- Original Message - From: "Jenda Krynicky" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 19, 2003 2:41 AM Subject: Re: html files for ppms > From: "Beau E. Cox" <[EMAIL PROTECTED]> > > I have some custom html documentation I want to > > include in a ppm for distribu

RE: RE: Check if webserver is online

2003-06-19 Thread Dan Muey
> > > You are right ping is the best way to know if the machine is > > > connected to the network. Search for ICMP on cpan > > > > Assuming ping is not disabled on that machine and/or > network and you > > have 100% control over if it ever is or not, sure. But pinging a > > machine at your home

Why did @{$$a}[$i]; fix my problem?

2003-06-19 Thread Richard Heintze
The following fragment of code retrieves an integer from an array that is passed by reference. It was working fine: my $t = @$curr_true[$ev_count]; I made some changes else where in the program (from which this fragment comes) and suddely both the web server and (thank goodness) the debu

Re: Perl debug

2003-06-19 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Steve Grazzini) writes: >On Wed, Jun 18, 2003 at 05:21:06PM -0700, sandip das wrote: >> can anybody let me know how to print out values of >> certain variables in "Perl Debug" mode while doing >> single stepping ? > >Use 'p' or 'V'. 'x' is bette

Re: h2xs works fine: can't find new module though?

2003-06-19 Thread Beau E. Cox
- Original Message - From: "Ben Crane" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 19, 2003 3:36 AM Subject: Re: h2xs works fine: can't find new module though? > Hey all, > > Followed the instructions for using h2xs and > everything seems okay. Problem is, when I t

Getopt::Simple

2003-06-19 Thread Paul Kraus
What does env, and order do when using this module? 'help' => { 'type' => '', 'env' => '--', 'default' => '', # 'verbose' => '', # Not needed on every key. 'order'

Re: Why did @{$$a}[$i]; fix my problem?

2003-06-19 Thread Jeff 'japhy' Pinyan
On Jun 19, Richard Heintze said: > The following fragment of code retrieves an integer > from an array that is passed by reference. It was > working fine: > > my $t = @$curr_true[$ev_count]; That's ugly syntax. You shouldn't use an array slice when you're getting back ONE value. $foo = @bar[$

Re: readir

2003-06-19 Thread Josimar Nunes de Oliveira
Hi, try this sample code: $dir = 'C:\\Folder\\.'; print "'\n", $dir; opendir DIR, $dir or die "Cannot open $dir: $!"; foreach (@files=readdir DIR){ print '"\n", $_; } Good luck, Josimar - Original Message - From: "Ronen Kfir" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Th

RE: readir

2003-06-19 Thread Dan Muey
Just niticed a couple things, no biggie but: > Hi, try this sample code: > > $dir = 'C:\\Folder\\.'; > > print "'\n", $dir; Do you mean print "\n" without the single quote next to the newline ? > > opendir DIR, $dir or die "Cannot open $dir: $!"; > > foreach (@files=readdir DIR){ What is @fi

thread-safe config parser

2003-06-19 Thread Jeremy Vinding
well, since no on was able to answer this question: http://nntp.x.perl.org/group/perl.beginners/48453 i'll ask another :) does anyone know of a config parser that i could use in an ithreads environment with multiple threads all reading from (and changing) multiple config files? thx Jeremy --

How to retrieve a MAC address

2003-06-19 Thread abg
Hi All, I need to retrieve the MAC address of my local system from a Perl script. I'm running RedHat 7.2. Can anyone point me to some sample code for accomplishing this? I've Googled for quite a while, and come up empty. Alternatively, does anyone know where the MAC is stored on RedHat 7.2? Tha

smtp problem

2003-06-19 Thread anthony
Hi, I'm trying to send html message but i can't I have a variable called Message that is has an html page in it .. now what modification should i make to my code so it sends the data into html form Any help is appreciated CODE IS BELOW ## Create a new SMTP object # If you can't connect, don

RE: How to retrieve a MAC address

2003-06-19 Thread Kipp, James
you can parse ifconfig or arp and get it > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 19, 2003 12:24 PM > To: [EMAIL PROTECTED] > Subject: How to retrieve a MAC address > > > Hi All, > > I need to retrieve the MAC address of my local sy

RE: How to retrieve a MAC address

2003-06-19 Thread abg
Do you have any examples of this in action? > -Original Message- > From: Kipp, James [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 19, 2003 11:26 AM > To: Aaron Gillette; [EMAIL PROTECTED] > Subject: RE: How to retrieve a MAC address > > > you can parse ifconfig or arp and get it > >

Re: smtp problem

2003-06-19 Thread Casey West
It was Thursday, June 19, 2003 when anthony took the soap box, saying: : Hi, : : I'm trying to send html message but i can't : I have a variable called Message that is has an html page in it : .. : now what modification should i make to my code so it sends the data into : html form : Any help

Re: smtp problem

2003-06-19 Thread anthony
Hi, thank you Anthony -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to retrieve a MAC address

2003-06-19 Thread Beau E. Cox
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 19, 2003 6:24 AM Subject: How to retrieve a MAC address > Hi All, > > I need to retrieve the MAC address of my local system from a Perl script. > I'm running RedHat 7.2. > > Can anyone point me t

RE: How to retrieve a MAC address

2003-06-19 Thread Kipp, James
i don't have access to a linux box at the moment (Solaris's ifconfig is different) but I did find this in some older emails: $ifconfig = '/sbin/ifconfig'; my @hwaddrs = `$ifconfig` =~ /\b((?:[a-f\d]{2}:){5}[a-f\d]{2})\b/gi; you can do the rest :) and I did not test the regex > -Original Messa

Re: Access DB

2003-06-19 Thread PeterKorman
On Wed, Jun 18, 2003 at 09:20:55AM -0500, Dan Muey wrote: > > > > Any ideas how best to deal with Access Databases with perl? > > > > Look up "MDB Tools" on Freshmeat.net > Thanks! > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Would U

RE: Access DB

2003-06-19 Thread Dan Muey
> Would UnixODBC-0.19 be of any use? > > http://unixodbc-pm.org/ Perhaps but not with these folks. I'll take a gander at that thoguth for future reference. Thanks Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: readir

2003-06-19 Thread Josimar Nunes de Oliveira
Yes, it works fine (theres´s one character ' in error when I wrote ""'\n", the correct is "\n"). Try for yourself. Josimar - Original Message - From: "Dan Muey" <[EMAIL PROTECTED]> To: "Josimar Nunes de Oliveira" <[EMAIL PROTECTED]>; "Ronen Kfir" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>

Re: readir

2003-06-19 Thread Josimar Nunes de Oliveira
The '@files' gets a list of files from 'readir $dir'; if you don´t need it, cut it out and make how you want. Josimar - Original Message - From: "Josimar Nunes de Oliveira" <[EMAIL PROTECTED]> To: "Dan Muey" <[EMAIL PROTECTED]>; "Ronen Kfir" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent

Re: Accessing C/C++ Dlls using perl

2003-06-19 Thread zentara
On Thu, 19 Jun 2003 01:37:09 -0700 (PDT), [EMAIL PROTECTED] (Ben Crane) wrote: >Beau, > >Thanx, I hunting the info down now, seems quite >complex. I'm wondering whether it might not be better >to have a crack at this in C? Have you found perlXS to >be difficult to implement? Inline::C and Swig a

Re: readir

2003-06-19 Thread John W. Krahn
Ronen Kfir wrote: > > Hi, Hello, > I want to use readdir to read a directory tree & find a certain file, ^^ If you need to read a directory tree then you need to use the File::Find module. > which might be present in many subdirectories (this file

Re: How to retrieve a MAC address

2003-06-19 Thread John W. Krahn
"Beau E. Cox" wrote: > > Attached is a small perl script (ifinfo) I wrote to parse > ifconfig. It gives most of the information from ifconfig, > including MAC. It works on rh9. I tried it out out and found a couple of problems. Your GetOptions statement has: 'w|mac' => \$opt[2],

Removing entries from an array

2003-06-19 Thread Abhijit Shylanath
Greets, all. This is my first post here... I'm a seasoned C/C++ programmer, and recently started learning perl... it's going along well, and as an exercise, I've completely Perl'ed my webpage. I'm still a little dizzy because of the different directions it's pulling me towards, but it's fun anyway

Re: How to retrieve a MAC address

2003-06-19 Thread Beau E. Cox
- Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 19, 2003 8:42 AM Subject: Re: How to retrieve a MAC address > "Beau E. Cox" wrote: > > > > Attached is a small perl script (ifinfo) I wrote to parse > > ifconfig. It gives most o

Re: Removing entries from an array

2003-06-19 Thread Casey West
It was Friday, June 20, 2003 when Abhijit Shylanath took the soap box, saying: : : Greets, all. This is my first post here... I'm a seasoned C/C++ programmer, : and recently started learning perl... it's going along well, and as an : exercise, I've completely Perl'ed my webpage. I'm still a little

RE: Removing entries from an array

2003-06-19 Thread Dan Muey
> Greets, all. This is my first post here... I'm a seasoned > C/C++ programmer, and recently started learning perl... it's > going along well, and as an exercise, I've completely Perl'ed > my webpage. I'm still a little dizzy because of the different Howdy, cool, you'll love perl a lot there's

RE: How to retrieve a MAC address

2003-06-19 Thread abg
> Kipp, James wrote: > $ifconfig = '/sbin/ifconfig'; > my @hwaddrs = `$ifconfig` =~ /\b((?:[a-f\d]{2}:){5}[a-f\d]{2})\b/gi; Thanks! Worked like a charm. Aaron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Questions about sub process management

2003-06-19 Thread Steve Blumenkrantz
I'm using perl to create a regression testing system. The perl program I wrote runs applications, then compares output data with known good data. Sometimes the applications that are under test hang up and keep other tests from being run. I'm currently using the alarm feature of perl on my unix pl

RE: readir

2003-06-19 Thread Ronen Kfir
Hi, This is not I was asking for! I'll explain again: 1. Find all the places where a one specific file (with same name), is shown by read recursively all subdir of certain directory (it is a trigger file for the rest of my program). What you wrote is only the top level of the directory. 2. Wha

RE: readir

2003-06-19 Thread Dan Muey
> Hi, Howdy > > This is not I was asking for! > I'll explain again: > 1. Find all the places where a one specific file (with same > name), is shown by read recursively all subdir of certain > directory (it is a trigger file for the rest of my program). > What you wrote is only the top level

Quick CGI query_string() question

2003-06-19 Thread Dan Muey
Hello list, I have a probably simple thing. I'd like to basically do: use CGI qw(:standard); my $q = query_string(); Except I need to remove two params from it: So if $q above is : hi=bye&love=hate&one=two&etc=etc I want to remove, say 'love', so it'd be: hi=bye&one=two&etc=etc I know I could

Re: Quick CGI query_string() question

2003-06-19 Thread Casey West
It was Thursday, June 19, 2003 when Dan Muey took the soap box, saying: : Hello list, : : I have a probably simple thing. : : I'd like to basically do: : : use CGI qw(:standard); : my $q = query_string(); : : Except I need to remove two params from it: : : So if $q above is : hi=bye&love=hate&

Re: Perl debug

2003-06-19 Thread Jeff Westman
Peter- When I tried the 'y' command I got: DB<3> y @a adWalker module not found - please install What's that about?! Jeff --- Peter Scott <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, > [EMAIL PROTECTED] (Steve Grazzini) writes: > >On Wed, Jun 18, 2003 at 05:21:06PM -0700,

Stupid(?) Question on System "set"

2003-06-19 Thread Jeff Westman
I am trying to see what variables are set in my (parent) environment. The following gives me an error: 1 #!/bin/perl -w 2 3 @a = qx{set}; 4 5 print foreach (@a); 6 Error message: Can't exec "set": No such file or directory at ./x line 3. Yet, using qx{env} works

Re: Stupid(?) Question on System "set"

2003-06-19 Thread Casey West
It was Thursday, June 19, 2003 when Jeff Westman took the soap box, saying: : I am trying to see what variables are set in my (parent) environment. : The following gives me an error: : : 1 #!/bin/perl -w : 2 : 3 @a = qx{set}; : 4 : 5 print foreach (@a); : 6 : : E

Re: Stupid(?) Question on System "set"

2003-06-19 Thread Jeff 'japhy' Pinyan
On Jun 19, Jeff Westman said: > 1 #!/bin/perl -w > 2 > 3 @a = qx{set}; >Can't exec "set": No such file or directory at ./x line 3. > >Yet, using qx{env} works fine. Why? Because 'set' is a shell built-in, and 'env' is a program. Whatever shell Perl is using to run your command, i

RE: Using socket in perl

2003-06-19 Thread LoBue, Mark
> -Original Message- > From: Xavier Ambrosioni [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 19, 2003 1:26 AM > To: [EMAIL PROTECTED] > Subject: Using socket in perl > > > Hello all, > > I'm writing a server and a client in perl. My client communicates with > the server using sockets.

Re: Accessing C/C++ Dlls using perl

2003-06-19 Thread Tassilo von Parseval
On Thu, Jun 19, 2003 at 01:42:29PM -0400 zentara wrote: > On Thu, 19 Jun 2003 01:37:09 -0700 (PDT), [EMAIL PROTECTED] (Ben Crane) > wrote: > >Thanx, I hunting the info down now, seems quite > >complex. I'm wondering whether it might not be better > >to have a crack at this in C? Have you found pe

RE: Quick CGI query_string() question

2003-06-19 Thread Dan Muey
> It was Thursday, June 19, 2003 when Dan Muey took the soap > box, saying: > : Hello list, > : > : I have a probably simple thing. > : > : I'd like to basically do: > : > : use CGI qw(:standard); > : my $q = query_string(); > : > : Except I need to remove two params from it: > : > : So if $q

Exchange Server Mailbox format

2003-06-19 Thread Morrison, Trevor (Trevor)
Hi, Does anyone know which mail box storage format an 2000 exchange server uses. I am looking to parse emails that are stored in the folders. Thanks Trevor

Re: Rational Clearcase perl and Mail::Send

2003-06-19 Thread David Storrs
On Sat, Jun 14, 2003 at 11:59:55AM -0500, Wiggins d'Anconia wrote: > David Storrs wrote: > > Is anyone familiar with Mail::Send and, if so, do you have an answer > > to this? > > > > It appears Mail::Send just wraps Mail::Mailer, which states that in its > open call, headers may be specified as

Re: Stupid(?) Question on System "set"

2003-06-19 Thread Jeff Westman
--- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Jun 19, Jeff Westman said: > > > 1 #!/bin/perl -w > > 2 > > 3 @a = qx{set}; > > >Can't exec "set": No such file or directory at ./x line 3. > > > >Yet, using qx{env} works fine. Why? > > Because 'set' is a shell built-in, an

Re: Stupid(?) Question on System "set"

2003-06-19 Thread Steve Grazzini
On Thu, Jun 19, 2003 at 07:01:32PM -0700, Jeff Westman wrote: >--- Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: >> On Jun 19, Jeff Westman said: >> >>> 1 #!/bin/perl -w >>> 2 >>> 3 @a = qx{set}; >> >>> Can't exec "set": No such file or directory at ./x line 3. >>> >>> Yet, using q

Re: mathing only one type of characters

2003-06-19 Thread R. Joseph Newton
Kevin Pfeiffer wrote: > > This is my "only slightly fancier" version - still uses DATA though; > (critique/advice always welcome): > > #!/usr/bin/perl > use warnings; > use strict; > > # zero_or_more > > my $valid_chars = get_valid_chars(); > my $regex = qr{^[$valid_chars]*$}; These might be a li

format

2003-06-19 Thread Ataualpa Albert Carmo Braga
Hi, this is my first message to list, than sorry for so basic question e for so bad english. I will try improve both. I did a small script with perl and I'd like to format the output: C -3.7975162.078833-0.795507 C 4.0463240.905644-0.106181 C