Re: $searchstring help

2001-12-07 Thread John W. Krahn
Daniel Gardner wrote: > > >> > >> Why slow it down with the 'i'? > >> $searchstring=~/[a-zA-Z0-9]/; > > > Why slow it down with a regular expression? :-) > > > if ( $searchstring =~ tr/a-zA-Z0-9// ) { > > i was bored, and thought i'd try a little benchmark. note, this > is for the specific

shifting scalars ??

2001-12-07 Thread Craig Inman
Hello all. I'm trying to find an easy way to 'diff' two files and print what is missing from each file. Let me start by saying that the system I'm working on does not seem to like File::compare or &main::compare_text. As I'm new to perl, I'm more or less trying to write a 'nested while read' loo

RE: RE: Passing variables

2001-12-07 Thread Yacketta, Ronald
> > Ron, I think you meant to send this to the list, too :) > > > > I don't know ksh, so I am terribly familiar with what's > going on there, but it doesn't look > > terribly difficult. > > > > I still don't know if you need anything returned to the > user. If you don't and these programs > >

Re: $searchstring help

2001-12-07 Thread Michael Fowler
On Sat, Dec 08, 2001 at 08:21:38AM +0800, Leon wrote: > The original poster says at least 1 letter or number .. " i want > something like..if $searchstring has at least 1 letter or number { > commands... }"; > > Therefore it should be $searchstring=~/[a-zA-Z0-9]+/; The + doesn't do anything

Re[2]: $searchstring help

2001-12-07 Thread Daniel Gardner
>> >> Why slow it down with the 'i'? >> $searchstring=~/[a-zA-Z0-9]/; > Why slow it down with a regular expression? :-) > if ( $searchstring =~ tr/a-zA-Z0-9/ ) { i was bored, and thought i'd try a little benchmark. note, this is for the specific problem expressed here, not the general case.

Re: how to automatically put 'membernames' in the msg posted.

2001-12-07 Thread Leon
- Original Message - From: <[EMAIL PROTECTED]> Thanks for your help John ! What I actually want is something like those message boards such as http://www.ikonboard.com/newindex.iB or www.delphiforums.com whereby after successfully logging in, we could view messages and if one decides to

Re: $searchstring help

2001-12-07 Thread Leon
- Original Message - From: "Shawn" <[EMAIL PROTECTED]> > > $searchstring =~ /[a-z0-9]/i; > > Why slow it down with the 'i'? > $searchstring=~/[a-zA-Z0-9]/; The original poster says at least 1 letter or number .. " i want something like..if $searchstring has at least 1 letter or

help with form

2001-12-07 Thread Pedro A Reche Gallardo
Hi all, I am working on a cgi script that can create a temporal file with either an uploaded file, or, in its absence, the pasted content of that file. I have managed to upload the file only if that is the only input field in my form, but if I add the choice to paste the content of the file,

Re: $searchstring help

2001-12-07 Thread Shawn
- Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, December 07, 2001 5:55 PM Subject: Re: $searchstring help > Shawn wrote: > > > > > On Fri, Dec 07, 2001 at 04:35:11PM -0500, Maurice Reeves wrote: > > > > not quite. \w matches _ also, a

Re: Disable ModPerl

2001-12-07 Thread Agustin Rivera
I'm sure I had a misunderstanding there somewhere ;) This is the basic idea of what I'm doing.. I have a New Years Eve Concert Performance page I'm working on. Similiar in construction to a typical page here at Pollstar, i.e.: http://www.pollstar.com/tour/searchall.pl?By=Artist&Content=Aerosmit

Re: Disable ModPerl

2001-12-07 Thread Matt C.
Mod_Perl loads an entire script into memory, which is why you *don't* want variables shared; this is why mod_perl makes you decalre the scope of your variables so carefully. If you are after disabling mod_perl for a specific script or directory, then you'll be able to do it. As far as variables go

Re: $searchstring help

2001-12-07 Thread John W. Krahn
Shawn wrote: > > > On Fri, Dec 07, 2001 at 04:35:11PM -0500, Maurice Reeves wrote: > > > not quite. \w matches _ also, and he didn't have > > > that in his list. > > > > > > how about > > > $searchstring =~ /^[a-z0-9]+/i; > > > > I'm not sure why you're both anchoring the pattern. He didn't spe

Re[2]: Disable ModPerl

2001-12-07 Thread Daniel Gardner
Friday, December 07, 2001, 11:40:06 PM, Agustin Rivera wrote: > I am under the idea that modperl recycles as many variables as possible to > speed up script processing. I don't want it to recycle variables in some > scripts (in particular, ones I haven't written and have no desire to debug). ta

Re: $searchstring help

2001-12-07 Thread Michael Fowler
On Fri, Dec 07, 2001 at 05:31:30PM -0600, Shawn wrote: > Why slow it down with the 'i'? > $searchstring=~/[a-zA-Z0-9]/; There is no reason, that's a good point. I was cargo-culting; appending the /i with no thought because the others were. Michael -- Administrator www.s

Re: Disable ModPerl

2001-12-07 Thread Curtis Poe
--- Agustin Rivera <[EMAIL PROTECTED]> wrote: > Is there a quick, simple command I can use to disable Modperl on all > variables in script, without having to qw' then all? > > Agustin Rivera > Webmaster, Pollstar.com > http://www.pollstar.com Agustin, I think you have a misunderstanding here.

Re: Disable ModPerl

2001-12-07 Thread Agustin Rivera
I am under the idea that modperl recycles as many variables as possible to speed up script processing. I don't want it to recycle variables in some scripts (in particular, ones I haven't written and have no desire to debug). Thanks, Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com

Re: Disable ModPerl

2001-12-07 Thread Daniel Gardner
Friday, December 07, 2001, 11:29:15 PM, Agustin Rivera wrote: > Is there a quick, simple command I can use to disable Modperl on all > variables in script, without having to qw' then all? what do you mean when you say "disable modperl"? -- Best regards, Daniel Democracy: Two wolves and a sh

Re: $searchstring help

2001-12-07 Thread Shawn
> On Fri, Dec 07, 2001 at 04:35:11PM -0500, Maurice Reeves wrote: > > not quite. \w matches _ also, and he didn't have > > that in his list. > > > > how about > > $searchstring =~ /^[a-z0-9]+/i; > > I'm not sure why you're both anchoring the pattern. He didn't specify it > had to start with a le

Fwd: RE: Passing variables

2001-12-07 Thread Curtis Poe
Sent this to the wrong list! Sorry. --- Curtis Poe <[EMAIL PROTECTED]> wrote: > Date: Fri, 7 Dec 2001 15:30:59 -0800 (PST) > From: Curtis Poe <[EMAIL PROTECTED]> > Reply-to: [EMAIL PROTECTED] > Subject: Fwd: RE: Passing variables > To: CGI Beginners <[EMAIL PROTECTED]>, > "Yacketta, Ronald" <[

Disable ModPerl

2001-12-07 Thread Agustin Rivera
Is there a quick, simple command I can use to disable Modperl on all variables in script, without having to qw' then all? Agustin Rivera Webmaster, Pollstar.com http://www.pollstar.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Passing variables

2001-12-07 Thread Curtis Poe
--- "Yacketta, Ronald" <[EMAIL PROTECTED]> wrote: > Folks, > > I have just completed a front-end enduser script that will take numerous > input values that > need to be passed onto other perl scripts depending on the user input. > > Is there a clean way (other than command line) to pass on the v

Passing variables

2001-12-07 Thread Yacketta, Ronald
Folks, I have just completed a front-end enduser script that will take numerous input values that need to be passed onto other perl scripts depending on the user input. Is there a clean way (other than command line) to pass on the variables from one script to another (the other scripts are calle

Re: $searchstring help

2001-12-07 Thread Michael Fowler
On Fri, Dec 07, 2001 at 04:35:11PM -0500, Maurice Reeves wrote: > not quite. \w matches _ also, and he didn't have > that in his list. > > how about > $searchstring =~ /^[a-z0-9]+/i; I'm not sure why you're both anchoring the pattern. He didn't specify it had to start with a letter or number,

FW: Question about searching a log file

2001-12-07 Thread Lance Prais
I am a beginning perl developer and am a little confused I was wondering if anyone out there can give me some direction. or at the very least tell me a good site for beginners to get information. it seem like every site is for advanced developers My situation is as follows I have a command that

Re: $searchstring help

2001-12-07 Thread Maurice Reeves
not quite. \w matches _ also, and he didn't have that in his list. how about $searchstring =~ /^[a-z0-9]+/i; >From: "Etienne Marcotte" <[EMAIL PROTECTED]> >To: Jesus Is Not Dead <[EMAIL PROTECTED]> >CC: [EMAIL PROTECTED] >Subject: Re: $searchstring help >Date: Fri, 07 Dec 2001 16:27:30 -0500 >

Re: $searchstring help

2001-12-07 Thread Etienne Marcotte
my try: if ($searchstring =~ /^\w+/) {...} I can't beleive you typed all the letters:P Etienne Jesus Is Not Dead wrote: > > hi > can anyone tell me how to short this... > if($searchstring =~ /A/i or $searchstring =~ /B/i or $searchstring =~ /C/i > or $searchstring =~ /D/i or $searchstring =~

$searchstring help

2001-12-07 Thread Jesus Is Not Dead
hi can anyone tell me how to short this... if($searchstring =~ /A/i or $searchstring =~ /B/i or $searchstring =~ /C/i or $searchstring =~ /D/i or $searchstring =~ /E/i or $searchstring =~ /F/i or $searchstring =~ /G/i or $searchstring =~ /H/i or $searchstring =~ /I/i or $searchstring =~ /J/i or $s

Re: Using die but not break out of the script

2001-12-07 Thread Michael . Mittentag
Just want to say thanks to everyone who responded, this is the first time I have used this list for help, and surprised how fast I got helpful responses.

Question about searching a log file

2001-12-07 Thread Lance Prais
I am a beginning perl developer and am a little confused I was wondering if anyone out there can give me some direction. My situation is as follows I have a command that generates the a log file with the following information I then need to parse through the page and check to see if TK_DISP_RU

Re: Working with Perl Modules

2001-12-07 Thread Lanceo
Aha! I just found out that ActiveState uses the ppm thingy instead of the manual method. I just d/l the latest Win32 ActiveState, installed it and used ppm3. Installation was a breeze. But for two days I have been trying to use make, nmake or dmake. I could not find a reference to make at the

RE: loopy question

2001-12-07 Thread Wright, Thomas
Thanks, It is working as expected! -Original Message- From: Wagner-David [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 2:39 PM To: 'Wright, Thomas'; Beginners (E-mail) Subject: RE: loopy question Yes, as long as you don't need the current record otherwise you would

Re: Using die but not break out of the script

2001-12-07 Thread Daniel Gardner
Friday, December 07, 2001, 7:38:11 PM, [EMAIL PROTECTED] wrote: > Is there a way to use die but not break the entire script? > system ("dir $servervolume > dirinfo") || die "cant get dir info"; > I want it that if does die to assign a value of zero to a variable? Is > that posssible? how abou

Re: Using die but not break out of the script

2001-12-07 Thread Brett W. McCoy
On Fri, 7 Dec 2001 [EMAIL PROTECTED] wrote: > Is there a way to use die but not break the entire script? > > system ("dir $servervolume > dirinfo") || die "cant get dir info"; > > I want it that if does die to assign a value of zero to a variable? Is > that posssible? Yes, you can use die to th

RE: Using die but not break out of the script

2001-12-07 Thread Bob Showalter
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Friday, December 07, 2001 2:38 PM > To: [EMAIL PROTECTED] > Subject: Using die but not break out of the script > > > Is there a way to use die but not break the entire script? > > system ("dir $servervol

RE: Using die but not break out of the script

2001-12-07 Thread Daryl J. Hoyt
You could use: system ("dir $servervolume > dirinfo") || ($var = 0); Daryl J. Hoyt Performance Engineer Geodesic Systems 312-832-2010 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, Dece

RE: loopy question

2001-12-07 Thread Wagner-David
Yes, as long as you don't need the current record otherwise you would need to change the way your loop functions to only read when necessary. Wags ;) -Original Message- From: Wright, Thomas [mailto:[EMAIL PROTECTED]] Sent: Friday, December 07, 2001 11:23 To: Beginners (E-mail) S

Using die but not break out of the script

2001-12-07 Thread Michael . Mittentag
Is there a way to use die but not break the entire script? system ("dir $servervolume > dirinfo") || die "cant get dir info"; I want it that if does die to assign a value of zero to a variable? Is that posssible? Thanks -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

loopy question

2001-12-07 Thread Wright, Thomas
Folks, A questions about loops and files. If I have the following construct: while () { $recA = $_ do something; while () { $recB = $_; if ($this) { do something2; } elsif ($that) { do something3; last; } else { # the o

Re: Deleting a line

2001-12-07 Thread Scott R. Godin
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mark McLogan) wrote: > Hi every body! > I don't know how i can delete a line of a file. > > Some body know? > > Thnk's perldoc -q delete print pack "H*", "4a75737420416e6f74686572204d61635065726c204861636b65722c0d"; -- Scott R. Godin

Re: Working with Perl Modules

2001-12-07 Thread Scott R. Godin
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Peter Scott) wrote: > At 04:24 PM 12/7/01 +, Lanceo wrote: > >Does just copying a module work? > > Not in general. I applied my amazing powers of perception in this case and > took an educated guess that you could get away with it for >

SNMP_util help

2001-12-07 Thread sean grossman
I am trying to retrieve the mac address from the arp table of another machine using Mike Mitchell's SNMP_util module. When I run the script below i get "à)" as the result instead of the mac address. I know the snmp daemon is running properly as i can use snmpget from the command line and it g

RE: Problem with replacing hash elements

2001-12-07 Thread Wagner-David
Here is a shot which works with data provided, but others may see other real problems with it. When it comes to hash and ref to to array within hash, I have not the best understanding. use strict "refs"; #

Suggestions For Flexible Text Output

2001-12-07 Thread Ken Hammer
Hi all, I have a script that gathers information from system commands and log files. There is a potential for 5 different command line switches to be used, that will determine the amount and types of information returned. Basicaly, which ever command line option the user uses, there will be

Re: Opening a URL

2001-12-07 Thread Brett W. McCoy
On Fri, 7 Dec 2001, Juan Manuel Espinoza wrote: > How can i open a URL in PERL? > > open URL?? LWP::Simple has an easy way to open URLs: use LWP::Simple; my $URL = 'http://www.amazon.com'; my $html = get $URL; You can get this from CPAN. Or you can do more elaborate stuff using HTTP::

Re: Opening a URL

2001-12-07 Thread chris . ball
On Fri, 2001-12-07 at 17:19, Juan Manuel Espinoza wrote: > How can i open a URL in PERL? With the 'LWP' modules. In this case, putting the HTML to Google's front page in $content: use LWP::Simple; my $content = get( "http://www.google.com/"; ) or die $!; Hope this helps, - ~C. -- Chris Ball

Re: Opening a URL

2001-12-07 Thread Agustin Rivera
This is a script I've been using. Not sure if I need all the definitions on top or not... use strict; use LWP::Simple; use URI::URL; use CGI qw(header start_html end_html); my $address="http://www.cnn.com";; my $content = get($address); print $content; Regards, Agustin Rivera Webmaster, Poll

Opening a URL

2001-12-07 Thread Juan Manuel Espinoza
Hi! How can i open a URL in PERL? open URL?? shnnk. Over _ Descargue GRATUITAMENTE MSN Explorer en http://explorer.msn.es/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Working with Perl Modules

2001-12-07 Thread Peter Scott
At 04:24 PM 12/7/01 +, Lanceo wrote: >Does just copying a module work? Not in general. I applied my amazing powers of perception in this case and took an educated guess that you could get away with it for HTML::Template. This offer does not apply to all modules, void where prohibited and

Re: How to delete a hash entry

2001-12-07 Thread Jenda Krynicky
From: "Tomasi, Chuck" <[EMAIL PROTECTED]> > I've got hash and I want to completely remove one or more entries from > the list. I tried undef, but that removes the value and not the key. > > %list = ( > first=> 1, > second => 2, > third => 3 > ) > > How can I remove

Re: How to delete a hash entry

2001-12-07 Thread Brett W. McCoy
On Fri, 7 Dec 2001, Tomasi, Chuck wrote: > I've got hash and I want to completely remove one or more entries from the > list. I tried undef, but that removes the value and not the key. > > %list = ( > first => 1, > second => 2, > third => 3 > ) > > How can I remove $list{seco

How to delete a hash entry

2001-12-07 Thread Tomasi, Chuck
I've got hash and I want to completely remove one or more entries from the list. I tried undef, but that removes the value and not the key. %list = ( first => 1, second => 2, third => 3 ) How can I remove $list{second} completely so the following loop only reports firs

Re: Working with Perl Modules

2001-12-07 Thread Lanceo
Does just copying a module work? Some of the modules have, for lack of a better term, 'text' embeded into them, and the package has so many other files that must have some purpose. I'm just worried about copying a module and having pieces missing... "Peter Scott" <[EMAIL PROTECTED]> wrote in me

Deleting a line

2001-12-07 Thread Mark Mclogan
Hi every body! I don't know how i can delete a line of a file. Some body know? Thnk's _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: renaming files - fatuous newbie query

2001-12-07 Thread Frank
On Fri, Dec 07, 2001 at 11:41:05AM -0500, McCarney, wrote: > Ok team, here's the deal. > I am *not* a programmer or a sysadmin, so be gentle. ;) > > Here is the code--checked it out in perldoc -q. Wow, it works... > My platform: Windows 2000 > > #! perl -w > use strict; > use File::Copy; opendi

RE: Deleting a line

2001-12-07 Thread Wagner-David
Depending on what you are after, there is a number of ways from one-liners to whatever. In most basic form, you will need to open file to read, another file to write. Using the regex or some type of test to determine if a line is to be re-written to the file or not.

renaming files - fatuous newbie query

2001-12-07 Thread McCarney, James Alexander
Ok team, here's the deal. I am *not* a programmer or a sysadmin, so be gentle. ;) Here is the code--checked it out in perldoc -q. Wow, it works... My platform: Windows 2000 #! perl -w use strict; use File::Copy; move("file1.txt", "file3.txt"); That's great, but I have umpteen scores of files

Deleting a line

2001-12-07 Thread Mark Mclogan
Hi everybody! somebody know how i can delete a line of a text file? i'm tryng some like this /^line1/d but i don't know the sintxs to execute some like this and i don't know if between "/" can be a variable ($_) Thak's all _

Re: Confirmation...

2001-12-07 Thread _brian_d_foy
In article <01ad01c17ee7$dcbfff80$5960a9cb@nothing>, [EMAIL PROTECTED] (Leon) wrote: > This /([\d.]*)\/.*/g works irregardless whether your ip is 206.48.16.3/12345 > or src=206.48.16.3/12345 it doesn't work at all, actually. -- brian d foy <[EMAIL PROTECTED]> - Perl services for hire CGI Meta

Problem with replacing hash elements

2001-12-07 Thread Epperson, Randall W
Greetings Here is the format of my notify file: e-internalteam: e-randy;e-joel;e-darren e-randy: [EMAIL PROTECTED] e-joel: [EMAIL PROTECTED] e-darren: [EMAIL PROTECTED] I'm trying to build a hash of arrays that looks like this: e-internalteam [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]

Re: Working with Perl Modules

2001-12-07 Thread Peter Scott
At 12:27 PM 12/7/2001 +, Lanceo wrote: >I am also using both and this morning tried to use make, to no avail. >Someone else gave me the tip to try >perl -V:make >to see what version of make my installs use, one returns with 'make=nmake;' >so I tried nmake instead... but neither make nor nmake

Re: Finding 'probable' duplicate records

2001-12-07 Thread iain truskett
* Carl Rogers ([EMAIL PROTECTED]) [08 Dec 2001 01:54]: [...] > I was hoping that I could find a way to say 'Compare two strings (the > fields within the strings aren't important). If string B has 17 common > characters out of 20 in string A, you might want to consider that a > match'. See the St

Re: Finding 'probable' duplicate records

2001-12-07 Thread Frank
perhaps: use Digest::MD5 or check out the Guttman Rosler transform: http://raleigh.pm.org/sorting.html -- Frank Booth - Consultant Parasol Solutions Limited. (www.parasolsolutions.com) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: System COmmand's in Perl

2001-12-07 Thread Brett W. McCoy
On Fri, 7 Dec 2001, David Lubowa wrote: > how can i execute system commands in perl just like how i would do it > while on console ..e.g tail -f /var/log/messages ..that kinda > thing...as you can see the OS type we talking about here is *NIX .. perldoc -f system -- Brett

RE: Finding 'probable' duplicate records

2001-12-07 Thread Carl Rogers
Hey John; Thanks for the help At 08:44 AM 12/7/2001 -0500, [EMAIL PROTECTED] wrote: >Carl, > > I don't have a lot of Perl-specific advice, but if it's possible to >dependably parse each line into the component fields (last name, first name, >street address, etc.), you could apply some intel

RE: how to automatically put 'membernames' in the msg posted.

2001-12-07 Thread John . Brooking
Reference that I just happened across on my desk: "CGI Programming with Perl", O'Reilly, Chapter 11, "Maintaining State". The three methods discussed are "Query String and Extra Path Information" (what I discussed below), "Hidden Fields", and "Client-Side Cookies". > -Original Message- >

Re: System COmmand's in Perl

2001-12-07 Thread Frank
On Fri, Dec 07, 2001 at 07:59:53AM -0500, Craig wrote: > system "tail -f /var/log/messages"; > > or > > exec "tail -f /var/log/messages"; or `tail -f /var/log/messages` Although this won't fork your program and -f means it follows the file updates. For this you can use the CPAN module File::

Re: Regex help

2001-12-07 Thread Frank
On Fri, Dec 07, 2001 at 02:09:25PM +0100, Jorge wrote: > I have this line in a file : > host clin09 { > hardware ethernet 00:80:9F:2E:3F:5E Is this all on one line or is it two, it looks like two here. if it's two either set $/=undef; to slurp all the lines in the file into one scalar variable

RE: Finding 'probable' duplicate records

2001-12-07 Thread John . Brooking
Carl, I don't have a lot of Perl-specific advice, but if it's possible to dependably parse each line into the component fields (last name, first name, street address, etc.), you could apply some intelligent guesses using the various fields. If this is possible, here's what worked pretty well fo

Re: PERL MySQL DBI

2001-12-07 Thread Daniel Gardner
Friday, December 07, 2001, 5:18:38 AM, Aaron Shurts wrote: AS> Okay, I was the one that asked the crazy question about the weird join, AS> but I got that figured out. Now I have a problem. AS> while( ($login, $existingemail, $areacode, $prefix, $rest) = $sth->>fetchrow_array ()) AS> { AS>

RE: how to automatically put 'membernames' in the msg posted.

2001-12-07 Thread John . Brooking
I imagine that you are speaking of sites which record session information on the server. The pages pass a session ID or some other identifying information with each internal link, often by appending something like "?id=123456789" to the end of each URL after the user logs in. To do this, you need

Re: Working with Perl Modules

2001-12-07 Thread Lanceo
I am also using both and this morning tried to use make, to no avail. Someone else gave me the tip to try perl -V:make to see what version of make my installs use, one returns with 'make=nmake;' so I tried nmake instead... but neither make nor nmake are recognized as valid programs in dos. I have

Re: System COmmand's in Perl

2001-12-07 Thread Djoko Priyono
Hi David, you can use either system or `` , for example : system("ls -F /var > /tmp/t.tmp"); or $tmp = `ls -F /var > /tmp/t.tmp`; -Djoko- www.dnet.net.id - It is said that the lonely eagle flies to the mountain peaks while the lowly ant crawls the ground, but cannot the soul o

RE:Regex help

2001-12-07 Thread Jorge Goncalvez
I have this line in a file : host clin09 { hardware ethernet 00:80:9F:2E:3F:5E I have this code: While . if ($line =~ /^host clin09/){ system(q{perl -i.orig -pe "s/00:80:9F:2E:3F:5E/$_Globals{MAC_ADDRESS}/" c:\\cygwin\\etc\\dhcpd\\dhcpd.conf}) or die; } It

Re: System COmmand's in Perl

2001-12-07 Thread Craig Sharp
system "tail -f /var/log/messages"; or exec "tail -f /var/log/messages"; Craig >>> David Lubowa <[EMAIL PROTECTED]> 12/07/01 07:45AM >>> how can i execute system commands in perl just like how i would do it while on console ..e.g tail -f /var/log/messages ..that kinda thing...as you can see

System COmmand's in Perl

2001-12-07 Thread David Lubowa
how can i execute system commands in perl just like how i would do it while on console ..e.g useradd -m -s /bin/false ..that kinda thing...as you can see the OS type we talking about here is *NIX .. thanx _ Be different Get yourself

System COmmand's in Perl

2001-12-07 Thread David Lubowa
how can i execute system commands in perl just like how i would do it while on console ..e.g tail -f /var/log/messages ..that kinda thing...as you can see the OS type we talking about here is *NIX .. thanx _ Be different Get yourself

Re: Write to a file problem

2001-12-07 Thread Jerry Preston
Jorge, You need to open and write all that you want to a new file: open(NOUVEAU, "> $nouveau") or die "je ne peux ouvrir $nouveau : $!"; open(new_NOUVEAU, "+> $nouveau_new") or die "je ne peux ouvrir $nouveau_new : $!"; while ($line = ) { last if ($line =~ /^host clin0

RE: Working with Perl Modules

2001-12-07 Thread Sharat Hegde
Dear Rod, Yes and No. On one of my installations, I am using Active Perl and on the other I use the Windows Core Perl version, which I downloaded some time back. I need to get the package running on both the machines. Also, I need to get this running on my web server which is Linux. Regards,

Re: next step

2001-12-07 Thread Jenda Krynicky
From: [EMAIL PROTECTED] > This is a question for Perl programmers in the field. > I would like to hear your advice in my next step. > > I work presently in a DOS - windows environment. I program > Perl in DOS. It is pretty straight Perl scripts. > Besides some DBI, and a spri

Re: stripping out non-numbers

2001-12-07 Thread Jenda Krynicky
> what would the regex be for stripping out non-numeric characters from > a string? I am trying to format phone numers in a standard way, so i > want to strip out all the extras people enter like . - ( ) [space] > > any help appreciated! > > thanks, > > rory As Japhy suggested for a similar q

RE:Write to a file problem

2001-12-07 Thread Jorge Goncalvez
HI, I have a file which ends by: host clin09 {hardware ethernet 00:80:9F:2E:3F:5E; filename "/bootp/linux/pre3.1/alize/startup.txt";} } I have a perl tk application where a user types a MAc Adress in an entry the variable is $_Globals{MAC_ADDRESS} . I wanted to replace what's come after hardw

RE: Working with Perl Modules

2001-12-07 Thread Crowder, Rod
Do you have Active State's perl? The package is available using PPM from their repository, and shouldn't need any compilation. -Original Message- From: Sharat Hegde [mailto:[EMAIL PROTECTED]] Sent: 07 December 2001 06:45 To: [EMAIL PROTECTED] Subject: Working with Perl Modules Hello, I

how to automatically put 'membernames' in the msg posted.

2001-12-07 Thread Leon
Could members here provide me with some lead with regards to the following :- I've seen many homepages that requires 'members' to login with their password and membername, they could then browse the pages at their own sweet time (browse here, there and everywhere), but when they post a msg, their

RE: stripping out non-numbers

2001-12-07 Thread Gibbs Tanton - tgibbs
$var =~ s/[^0-9]//g; -Original Message- From: rory o'connor To: perl Sent: 12/6/2001 7:15 PM Subject: stripping out non-numbers what would the regex be for stripping out non-numeric characters from a string? I am trying to format phone numers in a standard way, so i want to strip out

Socketpair problem!

2001-12-07 Thread Mei Leng Lee
hello there, I'm having some trouble using the socketpair. In the program attached, the STDIN, STDOUT, and STDERR of the child process has been redirected. The child process is running a copy of some interactive program (the parent process is suppose to read the prompt form the child process and

stripping out non-numbers

2001-12-07 Thread rory o'connor
what would the regex be for stripping out non-numeric characters from a string? I am trying to format phone numers in a standard way, so i want to strip out all the extras people enter like . - ( ) [space] any help appreciated! thanks, rory -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: perl script to remove control M's

2001-12-07 Thread Kredler Stefan
Since emacs is being used why not using emacs' buildin serep function? Macro: M-< ;; beginning-of-buffer M-% ;; query-replace C-q ;; quoted-insert C-m ;; newline 2*RET ;; newline !