Re: macperl installation module problem

2005-08-05 Thread Ben Crane
T R, Thanx for your advice...I have managed to get hold of perl2exe creators and they have said that the MacPerl.pm module isn't needed in my script and that there is a special comment command that can exclude unused modules...so at least there is a plan to deal with this. Thank you for your help

Thank you for application run help

2005-08-04 Thread Ben Crane
Thanx to all for the quick help on running an app through perl... Ben __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

macperl installation module problem

2005-08-04 Thread Ben Crane
Hi all, Just trying to install the macperl internetconfig module on windows 2000 and I have a curious problem. When trying to convert my pl file to an exe it keeps asking for a types.pm within macperl...the file already exists with the mac\ folder under perl\lib? It seems to be a catch-22. It want

run application command in perl?

2005-08-04 Thread Ben Crane
Hey all, Is there a run application command in perl? I want to run an external program via a script. Regards Ben __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- To unsubscribe, e-mail:

Getting network error codes using perl

2004-08-25 Thread Ben Crane
Hi all, Does anyone know of a library/module that deals with network errors? I am pinging (using net::ping) a couple networks over a period of hours and I want to log the ACTUAL network error code that is generated when it fails/even passess. At the moment I just have a self-built error net but it

Re: Recording Ping responses in perl part 2

2004-08-24 Thread Ben Crane
Prasanna Kothari, Excellent, I've seen the mistake I made with my program now thanx to yours! Cheers. One more thing, Is there any module that allows you to log network errors whilst the program is pinging?? Thanx Ben ___ Do you Yahoo!? Win 1 of 4,0

Recording Ping responses in perl

2004-08-23 Thread Ben Crane
Hi all, I need to set the ping command running for a few hours on my machine, and record (the exact time/date) then the ping function fails. I have tried putting a script together but no joy. Does anyone have a script like this that I could please "borrow"?? I need to run the checks this afterno

Re: Unique Dir Listing

2004-04-13 Thread Ben Crane
Japhy, Thank you! But now I have another problem as a result: #!/perl/bin -w use strict; use File::Find; open (DEST, ">c:/temp/dirlist.txt") || die "opening log file: $!"; sub getlist { print DEST "$File::Find::name\n" if -d; print "$File::Find::name\n" if -d; } find \&getlist, 's:/';

Unique Dir Listing

2004-04-08 Thread Ben Crane
Hi all, I need to get a unique list of directories/sub-dirs, etc for certain drives...the problem is, when I run the following code, I get loads and loads of duplicates, which isn't what I want. Can anyone tell me what is wrong with my code? It works fine with files. #!/perl/bin -w use strict;

Unique DIR listing

2004-04-08 Thread Ben Crane
Hi all, I'm trying to get a unique list of all directories on certain drives in windows. Problem is, with my script, I get tons and tons of duplicates...can anyone point out what I'm doing wrong? #!/perl/bin -w use strict; use File::Find; open (DEST, ">c:/temp/p_drive.txt") || die "opening log f

REGEX: matching AFTER a specific character

2003-12-19 Thread Ben Crane
Hi all, Here is a code snippet, and yes I am going to use File::Basename to strip the file path/filename once I've stripped the entire path from a string. The string $_ is a line in a text file. I want to use File::Basename to pull apart the file path and filename, but first I need to extract the

file path pattern matching problem.

2003-12-10 Thread Ben Crane
Hi all, I'm trying to split apart a filepath...e.g: c:\test\abc\what\somefile.txt The length of the filepath will never be constant... e.g: foreach $line (@Path_Filename) { chomp($line); (@Path_Breakdown) = split(/(\w+\W)(\w+\W)/, $line); } but my biggest problem is how to match a

First module!!! YAAAAY!!! :)

2003-12-10 Thread Ben Crane
Hi all, Just sat done and put together my FIRST MODULE I went through an edited/modifyed text::parsewords and after lots of testing, editing and playing around with...I got it to work! I didn't realize it could be THIS easy! I have been playing around with h2xs and getting really confused. If

command line commands passed to perl script?

2003-12-09 Thread Ben Crane
Hi all, Sorry, should have added this to my last email. Does anyone know how to pass values to a perl script through the command line? Do you use param as in CGI scripting/ I want a user to be able to specify certain parameters for the perl script (in case they want to run an overnight scheduler

wildcard File::Copy

2003-12-09 Thread Ben Crane
Hi all, Anyone know how to do a wildcard file::copy? E.g. I want to copy a file with a certain name but different extensions. I have tried concatenating ".*" to the end of a filename (without an extension obviously) but it fails. This is what I had in mind...it's just a scribble and not exactly t

multiple Regex Q

2003-09-24 Thread Ben Crane
Hi all, Haven't used perl in a while and now I've got some regex stuff to do and need a couple pointers. I'm stripping address data into BS7666 (GIS format) format and an example of the data is: rushey way, lower earley waterloo rd, unit 4 34a essex road, wokingham I need to break the data into:

Re: Accessing C/C++ Dlls using perl

2003-06-20 Thread Ben Crane
No worries ;) I'll just install it and to hell with windows :) __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Accessing C/C++ Dlls using perl

2003-06-20 Thread Ben Crane
zentara, I'm almost exclusively going to go with inline::c since it adds the power of c and perl together (just the combination I need!) :) Problem is, getting the inline.pm module to work. I don't have nmake and have never needed it. I've always put the modules into the correct dir structure und

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

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

Re: Accessing C/C++ Dlls using perl

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

Re: Accessing C/C++ Dlls using perl

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

Re: Help needed regarding Parsing Apache Web log file, access_log

2003-06-18 Thread Ben Crane
Try: http://www.oreilly.com/catalog/perlwsmng/chapter/ch08.html good starting place! __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Re: Help needed regarding Parsing Apache Web log file, access_log

2003-06-18 Thread Ben Crane
Try: http://www.oreilly.com/catalog/perlwsmng/chapter/ch08.html good starting place! __ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECT

Accessing C/C++ Dlls using perl

2003-06-18 Thread Ben Crane
Hi all, I've tried this question in a forum dedicated to MITAB dlls (it's a series of c/c++ libraries designed to access MapInfo data) to no avail. My question is: can you access and use c/c++ dll's in perl?? At the moment, I have a MapBasic script pulling information from MapINfo and dumping int

Re: File::Copy -> Additional Parameters? Thank you

2003-06-12 Thread Ben Crane
Okay, Some good leads to work with...Thanx for the heads up guys!! Ben __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

RE: File::Copy -> Additional Parameters?

2003-06-12 Thread Ben Crane
... If not, no worries...I'll have to go at File::Ncopy or the long route. :) Mmmm...this might be a good idea for a module??? Cool...fun project :) Thank you anyway, Ben Crane __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync

File::Copy -> Additional Parameters?

2003-06-11 Thread Ben Crane
Hi all, Anyone know if the perl module File::Copy can handle date checks? Or whether there is another module that only deals with copying files that are newer than the ones they are over-writing? Similar to the Xcopy /D: command [I don't want to use a batch file at the moment in case someone want

RE: cgi LWP::Simple script and Apache: Thanx

2003-06-05 Thread Ben Crane
Dan, Thanx a million for your help...It's given me more to look at and figure out. Hope I can return the favour sometime! Regards Ben __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe,

RE: cgi LWP::Simple script and Apache

2003-06-03 Thread Ben Crane
> > Testing with mutliple unknown factors in the mix > causes an exponential increase in the difficulty of > debugging. Pretty much done all that... > Amen to that one. That's what I was tryign to get > him to do was narrow down and rule out different > things. > Like, if he's trying to get a ur

Re: cgi LWP::Simple script and Apache

2003-05-30 Thread Ben Crane
R. Joseph Newton, Thank you for your response. I am trying to get information from a website used by our company for generating timesheets...problem is, the timesheet reports are terrible and it'll cost money to get them fixed. I planned on accessing their website, getting the information from i

RE: Thanx Dan

2003-05-29 Thread Ben Crane
Dan, No...Thank you for trying!! I really appreciate it...you've done more than a lot of people would! I'm sure it's a windows thing and more importantly, I'm sure it's a admin setup from this end...the IT people here are obsessional about control, which is why OI have to duck and dive to get thin

RE: RE: matching INSIDE characters (regexp): THANK YOU!

2003-05-29 Thread Ben Crane
Hi, Thanx you Jaschar and Bob for your help, I've got a solid idea on what I'm doing wrong...back to the drawing board. Regards Ben __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe, e-

RE: cgi LWP::Simple script and Apache

2003-05-29 Thread Ben Crane
Dan, If it's not having any of this running locally, can I map a virtual server that is in fact the organisation's server? specify an alternate IP address? Please tell me if I'm way off beat Ben __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync

RE: cgi LWP::Simple script and Apache

2003-05-29 Thread Ben Crane
Dan, Nope, doesn't work, either of them. I get these errors from the error.log file Premature end of script headers: c:/program files/apache group/apache/cgi-bin/test.cgi Use of uninitialized value in print at c:/program files/apache group/apache/cgi-bin/test.cgi line 5. I'm running my perl fro

RE: RE: matching INSIDE characters (regexp)

2003-05-29 Thread Ben Crane
Jaschar Otto, Okay, thanx a million, Bob's idea of splitting the string is a good one and now I have your code. thank you! Ben __ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com -- To unsubscribe, e-mai

RE: matching INSIDE characters (regexp)

2003-05-29 Thread Ben Crane
Bob, Excellent, one more question: using my (x,y,z) = /x/ /y/ /z/ to place the access log data into various variables, can you use the split command within this context? eg. my (x,y,z,a,b,c) = /x/ /y/ /z/ /split (abc)/ ?? Thanx Ben __ Do you Yahoo!? Yahoo! Calend

RE: cgi LWP::Simple script and Apache

2003-05-29 Thread Ben Crane
--- Dan Muey <[EMAIL PROTECTED]> wrote: > > Please reply to the list and not just to me so > everyone can help/learn. Done. > First things first. Before you get into parseing the > result of get() > Make sure it's getting the right thing. > > 1) Can you open http://www.google.com/ in a browser

RE: matching INSIDE characters (regexp)

2003-05-28 Thread Ben Crane
Jaschar Otto, Yep, you're right with the second guess :-) I didn't explain it too well so apologies from me. Actually, I'm creating a log file parser where the results can be placed into a mysql database. Most log file analyzers use [15/Jan/2003:11:25:46 +] and split the date and time...but

matching INSIDE characters (regexp)

2003-05-28 Thread Ben Crane
Hi all, Anyone know how to match characters that occur within a set of other characters? e.g: [15/ I want the 15...get [15/ using /\[(\d{2}\/)/ which is what it gives me, but I want to match starting/ending characters anywhere within a string and take the value between the start/end characters?

perl's pattern-matching within VB

2003-02-07 Thread Ben Crane
Hi all, Is there a way of using perl's amazing pattern-matching skills within VB???I find using VB to query txt files, etc to be more cumbersome and less friendly than perl's...I was wondering whether anyone had been able to utilize perl from within VB, and if so, how? I'm presuming using a perl

httpd and SVG?

2003-01-16 Thread Ben Crane
Hi list, Whenever I load an SVG document into my apache browser it prints the contents of the XML. I'm presuming that apache doesn't come equiped to deal with SVG? Do I need a special module to install? Or can I modify the httpd file to deal with SVG types (in a sense, switch it on?) e.g.: AddTyp

Apache & WINNT : Thank you note...

2003-01-16 Thread Ben Crane
didn't know I had to do!) :) Once again a big thank you!!! Ben Crane __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e

RE: Local Apache Server and CGI?

2003-01-15 Thread Ben Crane
Hi list, Please forgive what must be seen as amazingly naive! I have just managed to get an apache server loaded locally (so I can test my scripts/etc) without putting them on our corporate server all the time. Now I've managed to get php to work...but a simple *.cgi script that prints "script wor

Matching and Filling Arrays

2002-12-16 Thread Ben Crane
I have a dummy list: Dog, A, B, C Dog, 1, 2, 3 Cat, A, 2, 3 I have a unique list of the first record, Dog and Cat...I want to look through the unique list, and then match all the records from the main list (as above)-matching the unique list value (Dog/Cat) with the main list...then if there are

Hash Access Query

2002-12-03 Thread Ben Crane
Hi, right, my first attempt at a hash of arrays appears to have some success...but I have a query: sub HoA { foreach $arb (@uniqueroadname) { foreach $doublearb (@contents) { if ($doublearb =~ m|$arb|) { print "$arb $doublearb\n"; push @temparray, $doublearb; } } } $arrayref{$arb} = [@temp

modification on hashes/unique values

2002-12-02 Thread Ben Crane
Hi, a slight change to the previous mail: if I've got a key (e.g. A, and I have 3 or 4 keys (which are all A) which correspond to different data... e.g. Acorn Drive is a key, but there are several parts the make up Acorn Drive...I want a key (Acorn drive) to be able to refer to EVERY part of it..

unique elements in an array...complex data

2002-12-02 Thread Ben Crane
Hi, %arb=(); foreach(@contents) { $fnd{$_}=1; } @unique=keys %arb; this gets unique values from an array...but I want to find unique records BASED on one column!. e.g. if a CSV contains road_name, road_number, etc. and I want to just check for unique values for road_name. how do i do that, as

unique elements in an array...complex data

2002-12-02 Thread Ben Crane
Hi, %arb=(); foreach(@contents) { $fnd{$_}=1; } @unique=keys %arb; this gets unique values from an array...but I want to find unique records BASED on one column!. e.g. if a CSV contains road_name, road_number, etc. and I want to just check for unique values for road_name. how do i do that, as

Choice of methods...

2002-12-02 Thread Ben Crane
Hi all, I have to convert a standard CSV file (nothing special) into a specific custom-defined format...now, I've decided to do it in perl because perl is just lovely with txt files. But my one question is, since I'm reading a line from an array (which has the contents of the CSV in it) and perfor

Re: Hashes Question : Thank you

2002-11-27 Thread Ben Crane
Cheers, I was going to think about using a hash for a text file that contains information from a file::find...there are thousands and thousands of files I want to x-check and update it the modified date differs...at the moment, arrays work fine, but I was hoping a hash would mean a slightly quick

Hashes Question!

2002-11-27 Thread Ben Crane
Hi all, One quick Q about hashes: they contain a key and data? e.g: %stuff=(A => 'one', B => 'two'); where A and B are keys to data one and two...but what happens if you have a massive text file wher you had one key, but 20 or 30 columns of data? do you do this: %stuff=(A => 'one',

Hashes Question!

2002-11-27 Thread Ben Crane
Hi all, One quick Q about hashes: they contain a key and data? e.g: %stuff=(A => 'one', B => 'two'); where A and B are keys to data one and two...but what happens if you have a massive text file wher you had one key, but 20 or 30 columns of data? do you do this: %stuff=(A => 'one',

time/date stamp

2002-11-25 Thread Ben Crane
hi all, using stat($mtime)..I want to convert into mmdd...anyone know the format for that, I can only think of converting it to local time...no good... thanx Ben __ Do you Yahoo!? Yahoo! Mail Plus – Powerful. Affordable. Sign up now. http://mai

emailing myself?

2002-11-25 Thread Ben Crane
Hi list, I can send an email using send_mail...but does this require the email comes from the web, can I write this into my code as a function, and if a certain condition is met, I can an email saying something it wrong? Does send_mail have any problems that I should know about?? running it loca

modification of stat problem

2002-11-22 Thread Ben Crane
Hi, Sorry, I forgot to add this: using file::find::name...what happens with folders that have a space in them, e.g. f:\special information\? Is there a special way of dealing with that? Ben __ Do you Yahoo!? Yahoo! Mail Plus – Powerful. Affordabl

file not found : stat problem

2002-11-22 Thread Ben Crane
Hi list, I've got a silly problem that for some reason I can't work out..the following program goes through a txt file that contain folder structures, e.g. j:\temp\ex\ I want the program too loop through the array, and give me all the files within those directories and their size...but sometimes i

Integrating Perl scripts in VB?

2002-11-12 Thread Ben Crane
HI list, anyone know how to use perl scripts WITHIN a VB application? I want to get a directory listing of certain files into a VB array and wanted to use some of my already created perl scripts... thanx Ben __ Do you Yahoo!? U2 on LAUNCH - Exclus

Integrating Perl scripts in VB?

2002-11-12 Thread Ben Crane
HI list, anyone know how to use perl scripts WITHIN a VB application? I want to get a directory listing of certain files into a VB array and wanted to use some of my already created perl scripts... thanx Ben __ Do you Yahoo!? U2 on LAUNCH - Exclus

cgi scripts and a crashing server:advice needed

2002-10-10 Thread Ben Crane
Hi list, 2 Right, I have a few (6 to be exact) cgi scripts that run (not at the same time) on our web server, all 6 do a variety of different things like parsing data from a csv file and creating a suitable output html format and redirecting to other pages. Our server has crashed and there seems

redirection from a page not found error

2002-10-08 Thread Ben Crane
Hi list, can one redirect from a web page that cannot be found? i.e. If for some reason www.yahoo.com came up blank can perl redirect back to the original page or to an error page? Ben __ Do you Yahoo!? Faith Hill - Exclusive Performances, Videos

Re: Redirect Problem

2002-10-08 Thread Ben Crane
Hi List, I have a problem, when I try to redirect to a new site...I get the following text in the browser window: Status: 302 Moved location: www.yahoo.com it doesn't immediately go to yahoo. regards Ben __ Do you Yahoo!? Faith Hill - Exclusive

Passing values through 2 different CGI scripts

2002-10-08 Thread Ben Crane
Hi List, I have an online web map created through mapinfo-when you click on a part of the JPEG image it loads a CGI script and passes a unique 12 digit number which then identifies where on the map it is. After the road/point has been selected and the cgi script has returned the location-it then

Window API: Changing window focus

2002-02-12 Thread Ben Crane
Hi List, Sorry about this being a non-perl question... anyone know what API command changes the window focus? I have a VB program that needs to refocus and maximise a window...I can't seem to find any API commands that let me do this... thanx, Ben _

Perl and Visual Basic

2002-02-05 Thread Ben Crane
Hi List, Perls useful approach to string/txt processing is something I would like to incorporate into a Visual Basic Application. I am going to be using the VB program to analyze HTML pages and want to highlight various tags (that can also be replaced)--doing this in VB is possible but annoying,

using stat and file::find

2002-01-10 Thread Ben Crane
hey guys, I have this code that prints out the direc structure/filenames for whatever root i choose...I would like to have a stat for each file...how do i go about doing this? I thought about adding it in the wanted() sub but I've had little success...I want each file to have all the necessary sta

traversing a file tree...one step further

2002-01-10 Thread Ben Crane
Hi list, I have got a program running that opens a text file, finds file names within the txt file and then runs a file::find to determine the location of these files (within the same directory). My next question is: If i want to write a list of all the files within more than one directory how do

Reports and PERL

2001-12-11 Thread Ben Crane
Hi, me again :) Right, I have a text file, i want to create a nice, attractive report, with the possible inclusion of graphics. No I'm not going to ask how to do it, but I would like to know, can perl create attractive, business-type reports that look professional? The data I want to create repor

making a perl DLL

2001-12-11 Thread Ben Crane
Hi all, I'm having to send some data out of MapBasic and into a Perl program and then return it to MapBasic. I was thinking a small perl DLL program would work. I know how to send info to a DLL file, but HOW do you make a perl DLL from scratch??? Any assistance/code snippets would be a dream. I a

Printing a text file

2001-12-11 Thread Ben Crane
Hi list, Does anyone know how to print out a text file to a printer? i would like the option of chosing a printer to send the document to, in addition, will I need to reformat the text, or will it print out the text file as is? Thanx Ben __ Do You

perl and mapbasic

2001-12-05 Thread Ben Crane
Hello... can anyone help? Can (and if so, how) you use perl and mapbasic together? how do you imbed perl into mapbasic and vice versa? any assistance would be kool! Ben __ Do You Yahoo!? Buy the perfect holiday gifts at Yahoo! Shopping. http://sho

writing file::find results to an file

2001-11-26 Thread Ben Crane
Hi, I'm using file::find to (obviously!) find files, but I want the results to be placed in a text file so I can send the paths via email to others. Could someone have a look at this code (granted it might and is messy), But look at all lines beginning with * (near the bottom) and tell me why it

Array problems!

2001-11-13 Thread Ben Crane
I create a dummy file with 4 filenames in it...I have read these 4 names into @filelist...and when I pass the array to &wanted, it only looks for the last file..I KNOW this works with arrays, I've done it before...why does it keep taking the last value only??? #!usr/bin/perl -w use File::Find; $

whats wrong with this?

2001-11-12 Thread Ben Crane
hey guys, this file::find problem is getting me down...I have tried to simplify it as much as possible. these 3 files do exist on my c: root. the program doesn't find anything if I use a variable in my if statement, if I use a constant...bingo...I can't work it out...what am i doing wrong? #!usr/

arrays and file::find

2001-11-09 Thread Ben Crane
> Hi, > > I have a little advice to beg for :) > > I'm reading a file, putting in certain lines, > actually, the lines are paths to files on our > network. > I am going to put them into an array, and then run > file::find to double check, and put in a new array > the the paths in the array a

File::Find::Name and Arrays

2001-11-09 Thread Ben Crane
Hi, I have a little advice to beg for :) I'm reading a file, putting in certain lines, actually, the lines are paths to files on our network. I am going to put them into an array, and then run file::find to double check, and put in a new array the the paths in the array actually match their act

Directories, Arrays

2001-10-26 Thread Ben Crane
knowing whether I'm heading in the right direction...which is good of course...but also bad :) Ben Crane ([EMAIL PROTECTED]) Wokingham DC __ Do You Yahoo!? Make a great connection at Yahoo! Personals. http://personals.yahoo.com -- To un