XML::Mini question

2003-01-03 Thread Matt
Hi, I'm using XML::Mini to parse and print the contents of an xml file. The xml file has one root tag "" and identcal children "" which has 2 attributes "id & name" and 6 children " , , " " Since their can be any number of "" tags in the xml document at any one time, however, at all times, the

Re: Max range of rand function?

2008-07-03 Thread matt
On Jul 2, 10:04 pm, [EMAIL PROTECTED] (John W. Krahn) wrote: > howa wrote: > > On 7月2日, 下午11時59分, [EMAIL PROTECTED] (John W. Krahn) wrote: > >> howa wrote: > >>> Hi, > >> Hello, > > >>> I want to have a max range of rand function, so I use > >>> my $rnd = rand(4294967295) ; > >>> However, is it saf

Re: Optimize the script

2008-07-05 Thread matt
On Jul 4, 4:08 am, [EMAIL PROTECTED] (Jet Speed) wrote: > Hi All, > > I put togather a piece of code with some help, to capture the output as > below from a file "cxout1" as below. I am sure this can be written in few > lines or even differnt way of getting the same out put with use of hash etc. >

Re: Regex to array woes

2009-11-03 Thread matt
+=2) { print "$h2ip[$i]\n"; } $ ./test.pl 10.203.4.5 10.203.4.7 Or, if you don't mind the longer regex and don't want to have to skip array indices: my $string = 'Haresources : 10.203.4.5, Interfaces : 10.203.4.5 10.203.4.7'; my @h2ip = ($string =~ m/(\d{1,3}\.\d{1,

Re: How to redirect a message simultaneously to a file-handler and standard O/P

2009-11-18 Thread matt
On Nov 17, 12:32 pm, jimsgib...@gmail.com (Jim Gibson) wrote: > On 11/17/09 Tue  Nov 17, 2009  9:24 AM, "Parag Kalra" > scribbled: > > > Hi All, > > > I know this may be a very basic question but I don't know how to accomplish > > it. :( > > > I want to know how to redirect a message simultaneousl

Re: PRINT LAST ENTRY IN A FILE

2009-12-01 Thread matt
On Nov 28, 2:21 pm, paik...@googlemail.com (Dermot) wrote: > 2009/11/28 raphael() : > > > > >> 2009/11/28 raphael() : > >> > Hi, > >> Hi, > > >> > # records.txt > >> > 25.11.2009 NAME_0 > >> > 15.12.2006 NAME_3 > >> > 20.10.2007 NAME_1 > >> > 01.01.2008 NAME_3    <-- This whole

Re: speed test

2009-12-03 Thread matt
On Dec 1, 8:58 pm, practicalp...@gmail.com wrote: > Hello, > > Maybe it's not so suitable to ask this here. > But is there a good way (code sample?) to implement a speed test > between Perl and C? > For a project which handles lots of data we want to know how slower > perl is than C. > > Thanks. T

Re: speed test

2009-12-04 Thread matt
On Dec 3, 6:56 am, shlo...@iglu.org.il (Shlomi Fish) wrote: > Hi matt! > > On Wednesday 02 Dec 2009 18:29:53 matt wrote: > > > > > On Dec 1, 8:58 pm, practicalp...@gmail.com wrote: > > > Hello, > > > > Maybe it's not so suitable to ask this her

Re: Real newbie question

2010-07-21 Thread Matt
o Perl http://www.oreillyschool.com/courses/perl1/ Online Course, Pricy but very good. Tizag Tutorials http://www.tizag.com/ Free and pretty good. Matt -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Array Question

2010-12-14 Thread Matt
I am assigning a number of elements to an array like so: my @new = `find /home/*/new -cmin 1 -type f`; That works fine. I would also like to append more lines to that array from here: find /home/*/filed -cmin 1 -type f How do I do that without losing whats in the array already? -- To unsubsc

Linux Uptime

2010-12-16 Thread Matt
I have a perl script but I want to exit it if the uptime on the server is less then say an hour. Any idea how I would get uptime with perl? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Testing File Contents

2011-03-02 Thread Matt
I am looking for a simple way to test if a file does not contain a string. This is on a linux box. if myfile does not contain mystring { #do_something; } The file is basically a list of names and I want to test that a certain name is not in there. Is there an easy way to do that? -- To un

Re: Testing File Contents

2011-03-02 Thread Matt
gger once if its no where in the file. > The other way would be on shell - > # Untested > grep my_string my_file > if [ $? -eq 1 ] > then >     echo "Do something" > fi > ~Parag > > > > On Wed, Mar 2, 2011 at 9:55 AM, Matt wrote: >> >&g

Re: Testing File Contents

2011-03-02 Thread Matt
> The easiest way in my opinion is to use the 'grep' function like this: > > my $searchstring="whatever"; > open CFG, '<', $_file || die("could not open file: $_file!"); > my @data=; > close CFG; > if ( grep /$searchstring/i, @data ) { >  print "$searchstring found\n"; > } > This sorta worked. Ne

Shorten String

2011-04-05 Thread Matt
I am looking for a perl function or easy way to shorten a long string if its over X characters. Say I have: "Doe, John; 56943 Walnut Drive; SomeCity, NY" It messes up the display of my html form. So I would like it changed to: "Doe, John; . meCity, NY" Keep first 10 and last 10 characters

Re: Shorten String

2011-04-06 Thread Matt
>> You probably want something like: >> >>   substr $x, 10, -10, " ... " if length $x>  25; > > Very neat Paul. My hat's off to you. Worked perfectly too. Thanks Paul. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.

Rounding Date/Time

2011-05-02 Thread Matt
Have a date: 2011-05-02-16:40:51 Using this to get it: $tm = gmtime; $time_stamp = sprintf "%04d-%02d-%02d-%02d:%02d:%02d", $tm->year + 1900, $tm->mon + 1, $tm->mday, $tm->hour, $tm->min, $tm->sec; print "$time_stamp\n"; I need to round it to nearest 5 minute point. 2011-05-02-16:40:51 needs

find2perl output to array

2007-06-19 Thread Matt
,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); } Any help would be appreciated. Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: find2perl output to array

2007-06-19 Thread Matt
,$gid); (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, name; } for $element (@files) { print $element, "\n"; } What have I done wrong? Although if I put that for loop within the function it does populate,

Re: find2perl output to array

2007-06-19 Thread Matt
Martin Barth wrote: Hi Matt, I did that, and then at the bottom of the script I tried looping through just to verify that @files was populated - no dice. (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && push @files, nam

Re: find2perl output to array

2007-06-19 Thread Matt
Rob Dixon wrote: Matt wrote: Thanks Martin, change following line: (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ && /^DATA.*\.zip\z/s && print("$name\n"); to (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) && -f _ &

Re: compiling PERL programs

2006-08-13 Thread matt
. Matt. On Sun, 13 Aug 2006, hOURS wrote: Hi all, I'd be interested in compiling programs I write in PERL. This is possible, right? I see occasional mention of such here and there but can't seem to find information on how it might be done. I assume one would need appropriate softw

Re: installing question

2007-01-09 Thread Matt
And this answers his question exactly how? Mathew Arvind Autar <[EMAIL PROTECTED]> wrote: gentoo is a bad distrobution you should remove it and install a sane distrobution. Yours truly 2007/1/9, Jorge Almeida : > > I just installed Perl from source. My distribution (gentoo linux) > supports

Re: Loop while socket connection exists

2007-03-09 Thread Matt
king though. If I put the server interfaces down, then of course it fails with the "Could not create socket: $!\n". However, if I start the script with the server interface active it starts to iterate through the loop. But if I then take the server interface down it still iterates through

Re: Loop while socket connection exists

2007-03-09 Thread Matt
Jeff Pang wrote: } else { my $whileloop = 99; } Hello, There is a scope mistaken above.You declare $whileloop at the outside of the loop,while here you re-declare another $whileloop with "my".This $whileloop is different from the former one.So "my $whileloop = 99" s

Re: Loop while socket connection exists

2007-03-09 Thread Matt
voluted solution I'm sure but I can't seem to find anything else. Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Counting Word Occurances

2011-07-15 Thread Matt
I have a file with lines like so but the number of them is in the thousands instead of seven lines: blue red red red orange orange green I want it to count the occurances of each word it finds in the file. So output on this small file would be: blue (1) red (3) orange (2) green (1) The contents

Sorting a String

2011-08-16 Thread Matt
I believe you can sort an array like so: sort @my_array; I need to sort a string though. I have $a_string that contains: 4565 line1 2345 line2 500 line3 etc. Obviously \n is at end of every line in the string. I need it sorted. How would I approach this? -- To unsubscribe, e-mail: beginner

Copying a Hash

2012-01-31 Thread Matt
When I copy a hash like so: my %hash2 = %hash1; Modifying hash2 seems to modify hash1. How do I make it so there both independent after being copied? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Merging Files

2012-01-31 Thread Matt
Perhaps asking wrong place but I have two directories both full of hundreds of text files. dir1/file1 dir1/file2 dir2/file1 dir2/file2 I want to append all files together with same name into a new directory. dir1/file1 contains: hi by later dir2/file1 contains: woops dropped new_dir/file1 woul

Perl HTTP Get

2012-05-27 Thread Matt
I have a line like this: $rststr = get("http://"; . $dst . "/request.htm" ); Problem is that I have had this script hang due to the $dst site being down. Is there a way to do a time out? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@p

Re: Perl HTTP Get

2012-05-29 Thread Matt
>> I have a line like this: >> >> $rststr = get("http://"; . $dst . "/request.htm" ); >> >> Problem is that I have had this script hang due to the $dst site being >> down. Is there a way to do a time out? > > Consider using the core alarm() function, or using LWP::UserAgent (I'm > guessing you're

Re: Perl HTTP Get

2012-05-30 Thread Matt
>> Thanks.  Yes, using Simple.  Looking at this. >> >> Can I do something as simple as this? >> >> $rststr = ""; >> alarm(60); # set timer for 60 seconds >> $rststr = get("http://"; . $dst . "/request.htm" ); # try to get my data >> alarm(0); # turn off timer > > More or less, yes--have you tried i

Trimming Whitespace

2012-06-06 Thread Matt
Looking at some old code I wrote. my @listing; open(IN, list.txt) or die $!; while () { chomp; next if /^\s*$/; next if /^#/; push(@listing, $_); } close IN; I want to trim any new lines off end of data. chomp does that. I want to skip any lines that begin with # and next if /^#

Re: Trimming Whitespace

2012-06-06 Thread Matt
> Shawn has already provided an answer, but I wanted to point out what > your regular expression (/^\s*$/) is doing. That expression is > matching any string that is empty or only contains whitespace. > HTH, Ken Thanks. So what happens when you try to 'push' an empty string to an array? I assume

Filtering Characters

2013-09-03 Thread Matt
I have this: while () { chomp; next if /^#/; # do stuff } It skips to the next item in the while loop of the string begins with # and works fine. I would also like to skip to the next item in the loop if the string contains anything other then lowercase, underscores, numbers, da

String in Array

2014-02-20 Thread Matt
Having trouble making this work. my @alarm = ("xyz", "abc"); my $name = "ab"; unless (grep {/$name/} @alarm) { # do this } Since "ab" is contained in the array I want it to NOT 'do this'. What have I got wrong? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands,

Re: String in Array

2014-02-20 Thread Matt
> Having trouble making this work. > > my @alarm = ("xyz", "abc"); > my $name = "ab"; > unless (grep {/$name/} @alarm) { # do this } > > Since "ab" is contained in the array I want it to NOT 'do this'. What > have I got wrong? If I set 'my $name = "abc";' it seems to match. But I want to match

Perl Ping

2014-08-24 Thread Matt
Looking at ping in perl. http://perldoc.perl.org/Net/Ping.html Ii do not see a way to ping with a pattern the way it is allowed under shell with -p. http://linux.about.com/od/commands/l/blcmdl8_ping.htm Is there a way to use pattern without resorting to shell?

Remove Newlines from String

2016-09-06 Thread Matt
I am receiving log entries as a string and then writing them to a file with the date tacked on beginning. Problem is that sometimes the string I receive contains \n and it makes parsing the file with grep more difficult. Looking for a simple way to replace all \n in the string with text or somet

Re: urlencode and uri_escape

2005-01-14 Thread Matt Howard
say that uri_encode is correct. I don't believe there's a way to get the uri_encode function to do that for you, but you can translate before or substitute after if you really need them to match. -- Matt Howard <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED

regular expression matching vertical tab

2005-01-20 Thread Matt Matijevich
I am having troubles matching the Vertical Tab character using regular expressions. I have a string, I have looped through every character in the string and printed out the value returned from ord(), and I get 13 for one of my chars. I have searched and apparently that is the vertical tab charact

Re: regular expression matching vertical tab

2005-01-20 Thread Matt Matijevich
>ord() returns the _decimal_ number 13 (octal 015, hexadecimal x0D) which is >the CR (carriage return) character *NOT* the VT (vertical tab) character. Well, that would be my problem. Thank you -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regular expression match?

2001-04-16 Thread Matt Cauthorn
says "the beginning of a line, followed by one or more word charaters, followed by a "_", followed by the end of the line. Hope this helps: remember to talk your way through them step by step...it really helps! ~Matt C.

Re: referencing and subroutines

2001-04-17 Thread Matt Cauthorn
should be careful, as you can modify it from the script outside, giving you weird results. ~Matt C. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: Running a script

2001-04-18 Thread Matt Cauthorn
in your path. ~Matt C. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: Comparing arrays

2001-04-20 Thread Matt Cauthorn
throw this in...very 'perlish'. ~Matt __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: Perl CGI (Getting started.)

2001-04-20 Thread Matt Cauthorn
h he most likely is... 3) GET LINUX AND DO IT YOURSELF!! You will have a blast and learn a TON this way. Do yourself a favor and check this option out. You will be happy you did, trust me! Then you can get MySQL and really start to have some fun with your CGIs (but I get ahead of myself).

Re: CGI problem, no luck so far

2001-04-20 Thread Matt Cauthorn
ns at work without any problems. ~Matt C. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: Where do I set global environment variables --Linux

2001-04-20 Thread Matt Cauthorn
about the specifics of mandrake, but these are two very very common places to set env. variables. Good luck! ~Matt C. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: Perl Man Pages

2001-04-20 Thread Matt Cauthorn
cuments and Settings\mcauthor\Desktop>perldoc -f split split /PATTERN/,EXPR,LIMIT split /PATTERN/,EXPR split /PATTERN/ split Splits a string into a list of strings ...blah blah blah. Very Handy!! Hope it helps! ~Matt __ Do You Yahoo!

Re: parsing multiple files

2001-04-20 Thread Matt Cauthorn
gives you another angle of attack. ~Matt __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: How do I know which modules are installed?

2001-04-20 Thread Matt Cauthorn
it's installed. Hit Ctrl-C to cancel out. Hope this helps! ~Matt C. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: How do I know which modules are installed?

2001-04-21 Thread Matt Cauthorn
ktop>perldoc CGI NAME CGI - Simple Common Gateway Interface Class SYNOPSIS # CGI script that creates a fill-out form # and echoes back its values. #-- Etc. Etc. Here's my other method: perl -MCGI ...and it just sits there. Your module is inta

Re: Archiving

2001-04-22 Thread Matt Cauthorn
e up with the idea deserves applause. ~Matt C. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: Perl documentation (Net::DNS::RR::MX)

2001-04-22 Thread Matt Cauthorn
Matt - This worked for me from my linux box at work, but not on my home network using win2k...I guess you just need to hit the right server. BTW, I just yanked this from the documentation. #!/usr/bin/perl -w use Net::DNS; $name = 'perl.org'; $res = new Net::DNS::Resolver; @mx = mx($

Re: help me understand $_

2001-04-22 Thread Matt Cauthorn
Sean O'Leary -- Damn that was a good explaination! I felt like I understood $_ very well before, but I understand it even better now. A very perlish post indeed. Larry the linguist would be proud! Matt __ Do You Yahoo!? Yahoo! Auctions - bu

Re: Archiving

2001-04-22 Thread Matt Cauthorn
e SSH functionality). The crontab is relatively easy to setup and understand once you get your script written and its permissions set to execute. Let me know when you get your script hammered out and we'll get your crontab setup to run every night at midnig

Re: Archiving

2001-04-22 Thread Matt Cauthorn
e Net::Telnet if the need arises. ~Matt PS -I read about the use of Net::Telnet with other protocols from Lincoln Stein's new book "Network Programming With Perl," which has already paid for itself two or three times over for me. However, this time we'll go with the

Expect.pm

2001-04-23 Thread Matt Blatchley
Perl guru's, Looking for any examples of using the "stty -echo" command with the the expect perl module. I'm trying to spawn an ssh session and use an encrypted password from a flat file. The only problem is hiding the output from the expect session. Is it possible to make the password hidden

Re: mod_perl

2001-04-24 Thread Matt Cauthorn
Check out http://www.activestate.com/ for information on a mod_perl windows environment. Be warned that Apache is still considered somewhat experimental with Windows! ~Matt __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great

RE: Net::DNS::MX data

2001-04-24 Thread Matt Cauthorn
foreach $rr (@mx){ print "MX: ", $rr->preference, " ",$rr->exchange, "\n"; } } else {print "No mx data for $server \n";} }

Re: DBI tutorial

2001-04-30 Thread Matt Cauthorn
If you plan to use mysql, pick up " MySQL " from New Riders press. Paul DuBois writes a nice tutorial on the DBI / DBD that will have you doing plenty very quickly. Matt C. __ Do You Yahoo!? Yahoo! Auctions - buy the things you wan

Perl and NT

2001-05-01 Thread Matt Blatchley
particular folder after having the password emailed to the user... ...which in my opionon is a security risk in itself, but that's the way clients want it. For some reason I tend to think VB script might be able to itany suggestions would be helpful. Matt

Re: FTP package

2001-05-02 Thread Matt Cauthorn
I may be wrong, but it looks like machine 2 doesn't have the Net::FTP module installed. Try this to see if it is: perldoc Net::Ftp If it's installed, you'll see some text pop up straight away. As for machine one, I'm not too sure. I'm sure someone on the list can help

Re: CGI Problem

2001-05-02 Thread Matt Cauthorn
It's almost certainly (to my mind) your http header. Make sure and use the CGI.pm module, as it makes this type of thing extremely easy to write. --- "J. Patrick Lanigan" <[EMAIL PROTECTED]> wrote: > I am getting an "Internal Server Error" returned to my browser. The error > log shows the follow

Re: How to recursively tar ?

2001-05-04 Thread Matt Cauthorn
Why isn't the standard tar utility working for you? Try and avoid making things more complicated than they need to be. Once I spend 45 minutes making a perl script only to realize that I could get the same results with a one-liner and pipes on the command line! ~Matt --- [EMAIL PROT

Re: calling a Java class and also its memeber functions from Perl.

2001-05-04 Thread Matt Cauthorn
I'm quickly getting out of my league here, but it sounds like you may want to consider using SOAP::Lite for a remote call like that. I've never used this module, but have perused the docs and it looks very very cool and easy to use. --- Srinivas Samavedam <[EMAIL PROTECTED]> wrote: > Hi, > > M

Re: Regexp: Grouping and replacing with an unknown number of groups

2001-05-08 Thread Matt Cauthorn
Not sure if this will help you at this point, but I strongly recommend the Date::Manip module for anything involving parsing dates. It does everything you can imagine with dates and more. Tell it to parse your dates, and boom you can print them however you want, get differences, etc. There are ple

Re: Environment variable question

2001-05-08 Thread Matt Cauthorn
and exiting the script as the same user. This is an interesting one; I'll be interested to hear any and all feedback. ~Matt C. --- Paul <[EMAIL PROTECTED]> wrote: > > --- Hitesh Ray <[EMAIL PROTECTED]> wrote: > > I am required to modify an Environment variable from o

Re: beginner here - with basic cgi trouble

2001-05-10 Thread Matt Cauthorn
Type "which perl" at the command line to see the path to your perl interpreter. --- "Brett W. McCoy" <[EMAIL PROTECTED]> wrote: > On Thu, 10 May 2001, lemoninsz wrote: > > > hi,i have the same problem,when i do ./emailupload.cgi,error like this: > > "bash: ./emailupload.cgi: No such file or dir

Re: beginner here - with basic cgi trouble

2001-05-10 Thread Matt Cauthorn
Chip -- try this in your cgi bin. Type perldoc CGI for more info. #!/usr/bin/perl -w use CGI qw/:standard/; print header, start_html('hello world'), h1('hello world'), end_html; -- Cgi.pm makes everything easy. In your code below, you fogot to put the first tag... ---

Net::Telnet and context

2001-05-11 Thread Matt Cauthorn
;); print "This is the return: $line\n"; Any ideas are appreciated. I need this thing to work, as I'm the one who has to bounce apache on 15 servers by hand! Matt C. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: Net::Telnet and context

2001-05-11 Thread Matt Cauthorn
Oh man I've gotten so used the the || setup I completely forgot about how it treats the left side as scalar. Changed the script and it worked like a champ. This will turn out to be a very useful script indeed. THANKS! ~Matt C. --- Peter Scott <[EMAIL PROTECTED]> wrote: > At 03

Re: beginner here - with basic cgi trouble

2001-05-11 Thread Matt Cauthorn
is so rich with utilities I'd be amazed if you don't have it on your box. If THAT doesn't work, try entering the code by hand. Also consider dumping the buffer with $|=1; in your scripts. ~Matt C. --- Chip Wiegand <[EMAIL PROTECTED]> wrote

Recovered windows files and dos name limitations -- Ideas?

2001-05-12 Thread Matt Cauthorn
must be a way to write a script that will read the long file name and re-name it using VFAT or whatever win file system type supports long file names. There are simply too many of them to just rename by hand! Any ideas or modules you can suggest? Thanks M

Sorting a Two Dimensional Array

2001-05-15 Thread Matt Noel
2 | 1 3 1 3 | 3 0 2 Can someone show me a sample of some code? By the way the number of columns is small and fixed, I can just hard-code that part of the problem if I can just figure out the reference syntax I should use for passing the comparator values to the sort functio

Re: Using SSL and Perl to Gather Process Information

2001-05-17 Thread Matt Cauthorn
You may want to check this out: http://search.cpan.org/doc/BTROTT/Net-SSH-Perl-1.13/lib/Net/SSH/Perl.pm I bet this will get you where you want to go. ~Matt C. --- Ken Hammer <[EMAIL PROTECTED]> wrote: > > I need to write a perl script that will gather system information &

Re: ftp

2001-05-19 Thread Matt Cauthorn
ActivePerl/site/lib/Bundle/LWP.html ~Matt C. --- kosta gruzdnev <[EMAIL PROTECTED]> wrote: > > Thank all the perl gurus answering our naive novices' questions. > > ok, now the problem is: > > I try to install Net::FTP in WinNT. ppm says there is no such PPD file. T

Yet another @INC question...

2001-05-19 Thread Matt Cauthorn
::Readkey 2.14 Thanks, Matt C. __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/

Re: Yet another @INC question...Disregard

2001-05-19 Thread Matt Cauthorn
Please Disregard my earlier post...it's TermReadKey, not Term::Readkey. Oops. Works as you would expect now. Sorry! Matt C. --- Matt Cauthorn <[EMAIL PROTECTED]> wrote: > This one has me puzzled. I installed Term::Readkey. Totally standard, all tests > passed. Here's wha

Re: APACHE with MOD_PERL

2001-05-23 Thread Matt Cauthorn
e to you and everyone else out there who has to do mod_perl installs. Btw, there is an EXCELLENT mod_perl book "Writing Apache Modules in Perl and C" by Lincoln Stein and Doug MacEachern (the writer of mod_perl). Most of my notes from the above were taken directly from the book. ~Matt

Re: Similar mail lists for Linux/Unix??

2001-05-23 Thread Matt Cauthorn
Check out Linuxnewbie.org. A great site, in a similar vein as Perl Monks. Tons and tons of help there, and as the name implies it's geared toward promoting Linux and it's use to neophytes and intermediate folk like myself. ~Matt C. --- Tony Cook <[EMAIL PROTECTED]> wrote:

Re: Regrex question

2001-05-23 Thread Matt Cauthorn
;This is scalar context: $scalar "; # output follows: This is scalar context: 3 As always, critiques are welcome with any of my posts... ~Matt C. --- David Gilden <[EMAIL PROTECTED]> wrote: > Hello, > Thanks for all the help this list is providing, > > Here is today

Perl Templates?!

2001-06-08 Thread Matt Lyon
I was wondering... if there are any one-page perl-script-templates that're pre-done that handle typical perl issues, where the header has all the use-strict / debugging stuff in it... that you can edit and morph into your own scripts. I had one for bash that was awesome named new_script... it rea

Re: Cannot detect environment variables

2001-06-10 Thread Matt Cauthorn
"$ENV{MYVAR}\n"' testing Hope this helps! Regards, Matt > > --- George Petri <[EMAIL PROTECTED]> wrote: > > > > Hi all! > > > > Firstly, thanks to all those people who helped me with my command line > > arguments problem.

Re: extracting substr

2001-06-10 Thread Matt Cauthorn
This works for me... #!/usr/bin/perl -w while (<>){ print if $_=~/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/; } Regards, Matt --- William <[EMAIL PROTECTED]> wrote: > hi, > > i want to be able to read a text file and extract only the valid > ip addresses. howe

Re: CGI parser and stuff

2001-06-10 Thread Matt Cauthorn
imize it and try and stay with the curve. Good luck and have fun! Matt C. --- Burt Humburg <[EMAIL PROTECTED]> wrote: > Just installed Perl on a Linux box yesterday and I'm eager to get started... > > Is there a shareware/freeware Perl development environment? (As in comm

A Term::ReadKey question -- keep cursor put!

2001-06-13 Thread Matt Cauthorn
I'm trying something like: for ($i=0; $i<10; $i++){print $i;} and have the numbers iterate in ONE PLACE at the cursor (i.e. print, then backspace, print the new number, etc). I'm having problems figuring this out. Any ideas? Thanks Matt

Re: Net::Telnet

2001-06-23 Thread Matt Cauthorn
Password=>$pass, Prompt=>'/root\@.*/', Timeout=>8) || die $s->errmsg, "\n"; @stop=$s->cmd(String=>$stop,Prompt=>'/matt\@.*/') or warn $s->errmsg ,"\n"; print "Stopping $server: @stop\n";

Re: checking groups on unix

2001-06-27 Thread Matt Cauthorn
Hope this helps. perldoc -f stat will give you all the nitty gritty on the rest. Chances are good your script will return much more useful information than you initially thought! Matt --- "PURMONEN, Joni" <[EMAIL PROTECTED]> wrote: > Hi ya, > > I need to check the gro

System calls in perl for "ps" and "netstat" - less expensive way?

2001-06-29 Thread Matt Weatherford
t empty"); $tunnelok=0; } Is this really computationally expensive? (I already know this makes my code not portable) Im not calling these very often, is there a better way to do this? thanks, Matt

RE: System calls in perl for "ps" and "netstat" - less expensive way?

2001-06-29 Thread Matt Weatherford
part: 1) Id like to know if theres a better way to do this 2) Is it really horribly expensive to do this with sys calls? -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED]] Sent: Friday, June 29, 2001 9:52 AM To: 'Matt Weatherford'; [EMAIL PROTECTED] Subject:

how does one redirect both STDERR and STDOUT to $file?

2001-07-17 Thread Matt Lyon
so how does one redirect both STDERR and STDOUT to $file, do some stuff, and then get stderr and stdout back and playing nice? I'm trying: # if $LogLogfile="YES" if ( $LogLogfile eq "YES" ) { print "Logging stuff to log file...\n"; # redirect stderr --> stdout.

is there a module ala getopt::long that will ... as well as command-line completion

2001-07-30 Thread Matt Lyon
here's one for the group... is there a module ala getopt::long that will do the arg-getting as well as command-line completion with a predefined list/hash/etc... of keywords? -mL -- Life would be so much easier if its source code was well-commented. -- To unsubscribe, e-mail: [EMAIL PROTECTED]

perl and graphics

2001-07-31 Thread Matt Behrens
y comments!! Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Explaining myself correctly RE: SORTING BY DATE

2001-08-06 Thread Matt Crapo
from the raw values supplied by localtime before you do this. Good luck! Matt -Original Message- From: Daniel Falkenberg [mailto:[EMAIL PROTECTED]] Sent: Monday, August 06, 2001 5:05 PM To: Beginners (E-mail) Subject: Explaining myself correctly RE: SORTING BY DATE List, Please accept my sic

RE: Calling UNIX Commands?

2001-08-06 Thread Matt Crapo
f thumb - if you can avoid using a system call, do so. Good Luck! Matt -Original Message- From: Peter Scott [mailto:[EMAIL PROTECTED]] Sent: Monday, August 06, 2001 5:18 PM To: Chris Garaffa; [EMAIL PROTECTED] Subject: Re: Calling UNIX Commands? At 08:15 PM 8/6/01 -0400, Chris Garaffa

RE: using system?

2001-08-07 Thread Matt Crapo
tem command") and die "$!\n"; # AND says "Did I get a non-zero?" I prefer the first because it's easier to understand - especially if somebody else ever has to look at your code. And I suggest doing it on every system command (verifying the return value, that is). Bet

RE: To read from a file using RegExp

2001-08-07 Thread Matt Crapo
success } Good Luck! Matt -Original Message- From: Qiang Qiang [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 07, 2001 10:46 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: To read from a file using RegExp I have a file as follows: .SUBCKT JTJTAG Z@@793 Z@@753 Z@@109 Z@@86 Z@@

  1   2   3   >