Perl with Ajax issue

2019-08-12 Thread Matt Zand
er( -type => 'application/json' ); print $json; print $string; I am tesitng this on localhost. I am getting no response. Should I install Perl on the server or does it come with Apache package. -- Cheers, Matt Zand Cell: 202-420-9192 Work: 240-200-6131 High School Technology Services <htt

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

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?

Re: Invoking a script in Windows 7

2014-03-09 Thread Matt McAdory
usable for me so I do wish you luck in your endeavor). http://cygwin.com/ml/cygwin/2004-07/msg00163.html Matt === *Clarke's Three Laws* 1. When a distinguished but elderly scientist states that something is possible, he is almost certainly right. When he states

Re: Invoking a script in Windows 7

2014-03-08 Thread Matt McAdory
This isn't a perl programming issue, but a cygwin/windoze environmental execution issue. Please use the appropriate list to seek further assistance. http://cygwin.com/lists.html http://cygwin.com/ml/cygwin/2004-07/msg00163.html On Sat, Mar 8, 2014 at 6:25 PM, Yonghua Peng sys...@mail2000.us

Re: Installing Perl and CPAN local

2014-03-04 Thread Matt McAdory
let me suggest you start here: http://bit.ly/1lwoehv and http://www.catb.org/~esr/faqs/smart-questions.html and then report back with specific questions or problems you are having. Matt === *Clarke's Three Laws* 1. When a distinguished but elderly scientist states

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, e-mail:

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 on ab as well.

Identifying the current opened filehandle for writing as I'm getting undefined variable concatenation errors

2014-01-14 Thread Matt McAdory
);} print $FH $thing\n; close $FH; A friendly page in the fine manual to read. A nudge towards a llama or camel reference would be appreciated. Several days show my googlefu to be lacking. Where is my rookie mistake? Matt

Re: Identifying the current opened filehandle for writing as I'm getting undefined variable concatenation errors

2014-01-14 Thread Matt McAdory
provides enough time for $thing return some data. I will experiment with sleep(5). I would use expect for the telnet session, but this has to be run by activeperl on a windows platform. :/ I'd use the alternative for expect if I had the choice. Thanks again for looking. Matt On Tue, Jan 14, 2014

Re: Problem installing Log::Log4perl using Strawberry Perl on Windows

2013-11-25 Thread Matt McAdory
log4perl-de...@lists.sourceforge.net as the prior link suggests. Matt On Mon, Nov 25, 2013 at 9:06 AM, Shaji Kalidasan shajiin...@yahoo.comwrote: Dear Perlers, I tried installing Log::Log4perl on Windows (Strawberry Perl Version 5.18.1) but I could not install using both 'cpan' and 'cpanm

Filtering Characters

2013-09-03 Thread Matt
I have this: while (IN) { 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,

Attempting to be more perl-ish

2012-11-09 Thread Matt Sheppard
Looking for advice on how to be more perlish in this bit of code. The idea is to allow execution of a script without pathing in the $0 parameter: if ($0 =~ m/^\//) { exec($0 @ARGV); } else { exec(./$0 @ARGV); } Thanks, M@ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For

Trimming Whitespace

2012-06-06 Thread Matt
Looking at some old code I wrote. my @listing; open(IN, list.txt) or die $!; while (IN) { 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

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 it? Also, do consider

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 using LWP::Simple

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:

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

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:

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

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 rounded

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.perl.org/

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

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

Re: Testing File Contents

2011-03-02 Thread Matt
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 lm7...@gmail.com wrote: 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

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=CFG; close CFG; if ( grep /$searchstring/i, @data ) {  print $searchstring found\n; } This sorta worked. Needed a minor

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/

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

pdf to spreadsheet advice

2010-09-06 Thread Matt Johnson
to. Thanks -- Matt -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/

Re: Real newbie question

2010-07-21 Thread Matt
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/

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 here. But is there a good way (code sample?) to implement a speed

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. To

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() raphael.j...@gmail.com: 2009/11/28 raphael() raphael.j...@gmail.com: Hi, Hi, # records.txt 25.11.2009 NAME_0 15.12.2006 NAME_3 20.10.2007 NAME_1 01.01.2008 NAME_3    --

Re: problems with 'require'

2009-11-30 Thread Matt Whipple
Paweł Prędki wrote: file mydbtest.pm package dbredwings; For organization reasons, you should probably make the package name match the file name my $platform = mysql; my $database = dbplayers; my $host = localhost; my $tablename = players; my $user = player; my

Re: problems with 'require'

2009-11-30 Thread Matt Whipple
Paweł Prędki wrote: I changed all the permissions and what I get now is that everything works fine but whenever I make changes to the .pm file I need to restart the server that is running locally for the changes to be seen in my main script... This is not the case on the live target server

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 paragka...@gmail.com 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

Re: Regex to array woes

2009-11-03 Thread matt
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,3}\.\d{1,3}\.\d{1,3})/gi); for (my $i = 1; $i @h2ip; ++$i) { print $h2ip[$i]\n; } Matt -- To unsubscribe, e-mail: beginners

Re: Perl projects for beginners

2009-09-07 Thread Matt Young
Hi Gabor. So far, in my quest to learn perl, it's been pretty easy to learn how to program basic applications, that perform simple functions using modules from CPAN. I think beginners would greatly benefit from learning how to write their OWN perl module to aid in performing a task. This would

Re: Send email using SMTP

2009-01-09 Thread matt
I wasn't able to remember what it exactly said, but yes it is about $ENV{PATH}, on my machine perldoc perlsec is riddled with formating problems it looks like, here is a copy of what I mean: Perl automatically enables a set of special security checks, called ESC[4mtaintESC[24 m

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. Kindly

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 safe to use so, e.g. in 32

Net::SSLeay

2007-12-06 Thread Matt Hudas
disabled t/local/03_use...ok t/local/04_basic.ok t/local/05_passwd_cb.ok t/local/06_tcpecho...Use of uninitialized value in string eq at t/local/06_tcpecho.t line 50. Thanks, Matt

find2perl output to array

2007-06-19 Thread Matt
($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
; } for $element (@files) { print $element, \n; } What have I done wrong? Although if I put that for loop within the function it does populate, but it repeats each results 6 times. Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

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. snip (($dev,$ino,$mode,$nlink,$uid,$gid) = lstat($_)) -f _ /^DATA.*\.zip\z/s push @files, name; What have I

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 _ /^DATA.*\.zip\z/s push @files, $name

Re: File::Find again

2007-03-25 Thread Matt Herzog
On Fri, Mar 23, 2007 at 03:09:31PM -0700, Wagner, David --- Senior Programmer Analyst --- WGO wrote: -Original Message- From: Matt Herzog [mailto:[EMAIL PROTECTED] Sent: Friday, March 23, 2007 15:00 To: Begin Perl Subject: File::Find again Hello All. I can see why

File::Find again

2007-03-23 Thread Matt Herzog
Hello All. I can see why people hate this module but I can't seem to let go. I point this script at a deep dir structure that has java .properties files sprinkled throughout it. Right now when I have my regex hard coded in the file, (.properties$) the search works fine. I need to be able to use

File::Find

2007-03-22 Thread Matt Herzog
Hey all. I'm trying to write a script that will append a few chars (example _fr) to the end of the prefix filename. All the filenames I need to change end with .properties. I need to have this script descend into all subdirs of the dir specified at the command line. I can't seem to understand

parse for two regexes

2007-03-13 Thread Matt Herzog
Hi All. I'm trying to either strip everything outside the body tags or match everything inside them for three nearly identical web pages. I need the content of the pages minus header/footer. Ultimately I need to glue them all together into one valid html doc but that's for later. In general,

Re: Loop while socket connection exists

2007-03-09 Thread Matt
to iterate through the loop. But if I then take the server interface down it still iterates through, counting up and printing Socket connected. What am I missing here? Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

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

Re: Loop while socket connection exists

2007-03-09 Thread Matt
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/

$.:

2007-02-26 Thread Matt Herzog
What does $.: mean? -- Ubuntu eh? I'm not really into Pokemon. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

MIME::Lite

2007-02-20 Thread Matt Herzog
Hi All. I need some help with the below. The script works fine except that for most recipients or mailers/clients the strings of text so not alternate with the image files. In their mailers they see: Number of users logged-in for kaplanfinancial: Number of users logged-in for

mailing images from a url

2007-02-06 Thread Matt Herzog
togther. Thanks for any help! -- Matt -- No folly is more costly than the folly of intolerant idealism. whippy.pl Description: Perl program [EMAIL PROTECTED] ekolab heintz hubers saab armies [EMAIL PROTECTED] elmc ibem twitty textronz [EMAIL PROTECTED] ralpharma appledog diagia hbfullof pb

Re: test

2007-01-09 Thread Matt Richards
On Tue, 2007-01-09 at 18:45 +0800, Sayed, Irfan (Irfan) wrote: test it works :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: test

2007-01-09 Thread Matt Richards
On Tue, 2007-01-09 at 18:45 +0800, Sayed, Irfan (Irfan) wrote: test it works :) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

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: Free Perl Editor

2007-01-02 Thread Matt Richards
what do you use as your text editor then? OROSZI Balázs wrote: Emacs and Vim are both braindead. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Help with WWW::Mechanize

2006-11-30 Thread Matt Johnson
Mathew Snyder wrote: Tom Phoenix wrote: On 11/28/06, Mathew Snyder [EMAIL PROTECTED] wrote: I have a form I'm trying to fill out. One of the fields, despite being named in the HTML source keeps erroring out on me. select name=ValueOfActor fields = { ValueOfStatus

Re: How to manipulate environment variables in parent process?

2006-11-14 Thread Matt Johnson
siegfried wrote: I think the best I could hope for would be to write a perl script that generated a bat file and then I manually execute the bat file. I don't think there is anyway to automate the execution of the bat file. I'm sure that there is; if you can't put it into its own bat file, you

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 software, right

Re: How to use Perl for API testing

2006-07-10 Thread Matt Johnson
You might want to consider Test::WWW::Mechanize http://search.cpan.org/author/PETDANCE/Test-WWW- Mechanize-1.12/Mechanize.pm or WWW-Mechanize http://search.cpan.org/~petdance/WWW-Mechanize-1.18/ lib/WWW/Mechanize.pm -- MattJ On Jul 9, 2006, at 10:13 PM, Suja Emmanuel wrote: Hi,

Re: best way of getting a web document

2006-06-25 Thread Matt Johnson
cases. -- Matt Johnson -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http://learn.perl.org/first-response

Re: using hashes with request(POST

2006-04-16 Thread Matt Richards
Mr. Shawn H. Corey wrote: On Sat, 2006-15-04 at 22:30 +0100, Matt Richards wrote: hello everybody, :) i'm just starting with perl and i have come across a little problem that i cant seem to solve, atm i have this code ... my $response = $ua-request(POST $url, Content_Type = 'form-data

using hashes with request(POST

2006-04-15 Thread Matt Richards
hello everybody, :) i'm just starting with perl and i have come across a little problem that i cant seem to solve, atm i have this code ... my $response = $ua-request(POST $url, Content_Type = 'form-data', Content = my %fq_hash); i would like the hash values in $fq_hash to be submitted as a

Time::localtime help

2005-05-16 Thread Matt Kopeck
') displayed instead of 05. What is the easiest way to do this? Thanks, Matt DISCLAIMER* This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you are not the named addressee

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

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: urlencode and uri_escape

2005-01-14 Thread Matt Howard
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] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/ http

RE: another directory search, yet many subdirs

2004-02-16 Thread Matt Matijevich
snip under each of these suddirs, I need all the eml files deleted but there are thousands of them and the actual file name is training 2001.eml so my questions still remain, Can I have this search recursively down under all the pc subdir names? /snip File::Find will do what you need.

Re: Do not understand Hashes !

2003-09-05 Thread Matt Matijevich
I am only a Perl beginner myself (there is probably much better ways to do this) but I put this together, I did not use the $ARGV array but that should be easy to change, I also manually deleted blank lines and spaces from the input files so you might want to check for those when you are looping

Re: help if than else statement

2003-09-04 Thread Matt Matijevich
try this: if (@ARGV[0] == -q){print it worked\n;} else {print it did not work\n;} -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Net::LDAP error

2003-06-20 Thread Matt Thoene
explanatory. Why isn't it exported? -- Regards, Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Listing directory

2003-03-26 Thread Matt O'neill
of a directory specified in the program. Basically i need the perl program to simply call the unix ls function, not sure how to encorporate this into my script though, any ideas? Cheers matt. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: Simple perl program

2003-03-26 Thread Matt O'neill
works well now that great, I was wondering how could i get it to list the files from the subdirectories as well? maybe using the -d command ? cheers matt. James Kipp [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] . Im now trying to list a directory, but only the files

Simple perl program

2003-03-25 Thread Matt O'neill
Hi guys, I need a very simple command line perl program that takes two arguements, the frist being a filename and the second being a word to be searched for in that file. Then I simply want the result to print yes if arg2 is found, or no if it is not. Thanks for your help matt

Re: Simple perl program

2003-03-25 Thread Matt O'neill
; Thanks for your help R. Joseph Newton [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Matt O'neill wrote: Hi guys, I need a very simple command line perl program that takes two arguements, the frist being a filename and the second being a word to be searched for in that file

Listing directory

2003-03-25 Thread Matt O'neill
Hi guys, Need a perl CGI script that will print to a web page the contents of a directory specified in the program. Basically i need the perl program to simply call the unix ls function, not sure how to encorporate this into my script though, any ideas? Cheers matt. -- To unsubscribe, e

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 stocks and identcal children stock which has 2 attributes id name and 6 children price , yearwk low=.. high=.../, bid offer vol Since their can be any number of stock tags in the xml document

multi line comments

2002-12-11 Thread Matt Simonsen
I believe there are no multi-line comments in Perl. Do any of you have a good hack to fake these? Thanks Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: query a ph nameserver plus backtick question

2002-12-02 Thread Matt Simonsen
here; } Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Write hash of hashes to disk?

2002-11-15 Thread Matt Simonsen
in XML looping over all the keys and values. I could read that back in to a hash each time my script runs and update the hash, rewriting it to disk, but that would ding the elegance of my script and so I'm trying to avoid it. Suggestions would be greatly appreciated. Thanks Matt

query string into hash?

2002-11-13 Thread Matt Simonsen
to split counting the encoding @words = split ($querys{q}) ; I have to do this for millions of lines per month so any tips to help me optimize this would be appreciated. Thanks Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Time CHange Regulatr expression for 2am Crons ?

2002-10-25 Thread Matt Simonsen
this may not help you if you have something like */3 and it happens to run at 2:00 am, but this doesn't seem to be what you're looking for. Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Parse data file

2002-10-01 Thread Matt Simonsen
think they are the poorer of the many ways to do it. Any tips on how you'd elegantly separate the data would be appreciated. Thanks Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Parse data file

2002-10-01 Thread Matt Simonsen
On Tue, 2002-10-01 at 05:34, Janek Schleicher wrote: Matt Simonsen wrote at Tue, 01 Oct 2002 01:00:41 +0200: I need to get 2 fields out of a file which has the following format: I put a real clip below ... should be more helpful. What is the exact data you want to separate. I have

Preferred way to move and compress a file

2002-09-26 Thread Matt Simonsen
hundred megs so I want to be sure to do it right. Thanks Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: head as in unix

2002-09-18 Thread Matt Simonsen
You could write your own function that is a for loop that counts until 100, putting each line into the array and quits would work. There may be a more elegant way, though... Matt On Wed, 2002-09-18 at 09:31, Jakob Kofoed wrote: Hi there, Does Perl have a function like the UNIX head

RE: IDE's

2002-08-22 Thread Matt Wetherill
Not an IDE, but I use EditPlus 2 which has nice (IMHO) syntax display and allows you to run code and pipe the output to its own window with a single button press. Matt - ** Matt Wetherill University of Salford [EMAIL PROTECTED] mobile: +44 7812 016059 office: +44 161

Best way to split log

2002-08-20 Thread Matt Simonsen
) - www.careercast.com In other words I want hash[0] = 1.2.3.4 hash[1] = - hash[2] = - hash[3] = 15/Aug/2002:06:43:39 -0700 hash[4] = 200 hash[...] hash[10] = www.careercast.com Thanks Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: comparing file dates from different servers

2002-08-20 Thread Matt Wasserman
Not for nothing, and I am no expert, but you have a space between c and $ in your $destFile variable... -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Tuesday, August 20, 2002 9:56 AM To: [EMAIL PROTECTED] Subject: comparing file dates from different servers

CGI script problem

2002-08-19 Thread Matt Wetherill
window, but IE 6 tries to download the script and it looks like the server isn't being allowed to run it. I appreciate that this is probably a bit off-topic, but any advice or pointers to other resources would be greatly appreciated. many thanks Matt - ** Matt Wetherill

Best way to split log

2002-08-19 Thread Matt Simonsen
) - www.careercast.com In other words I want hash[0] = 1.2.3.4 hash[1] = - hash[2] = - hash[3] = 15/Aug/2002:06:43:39 -0700 hash[4] = 200 hash[...] hash[10] = www.careercast.com Thanks Matt -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Mail::Mailer

2002-07-19 Thread Matt Wetherill
Net::SMTP works for me (although I use the activestate perl package manager, which makes things easy :) regards Matt -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: 19 July 2002 09:02 To: [EMAIL PROTECTED] Subject: Mail::Mailer Hi I am having

Script advice

2002-07-19 Thread Matt Wetherill
entries, but this is defeating me! many thanks advance Matt - ** Matt Wetherill University of Salford [EMAIL PROTECTED] mobile: +44 7812 016059 office: +44 161 295 5853 ** Never try to teach a pig to sing…it wastes your time and it annoys the pig

Regular expressions

2002-07-19 Thread Matt Wetherill
struggling - any ideas would be greatly appreciated. regards Matt - ** Matt Wetherill University of Salford [EMAIL PROTECTED] mobile: +44 7812 016059 office: +44 161 295 5853 ** --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus

  1   2   >