Re: difference between FTP and SFTP

2008-05-29 Thread Ken Foskey
On Thu, 2008-05-29 at 11:00 +0530, Rajnikant wrote: Hi everyone, I have question about SFTP's connection modes. FTP can use Active or Passive mode for same. Is SFTP also supports such modes? It does not need the distinction. SFTP connects via ssh on port 22 only. Ken -- To

Re: No such file or directory

2008-05-29 Thread Ken Foskey
On Thu, 2008-05-29 at 11:45 +0100, Mimi Cafe wrote: my script is in the same directory as my files, but it cannot find the file ABC.txt in open() below. foreach my $supplied (@ARGV){ # Output file name set of element currently processed. # Open file to read from. open (INPUTFILE, ,

Re: 3270 connection via perl

2008-05-29 Thread Ken Foskey
On Thu, 2008-05-29 at 15:23 -0500, jm wrote: does anyone have a sample script for a 3270 connection via perl? i've read all i can find for the x3270, x3270-script, c3270, etc. but i can't quite wrap my head around how the scripting should work. i've done telnet connections with Net::telnet

Re: how does file gets send to remote machine using perl

2008-05-29 Thread Ken Foskey
On Thu, 2008-05-29 at 19:46 -0400, Richard Lee wrote: Hi, Someone wrote a perl script which manipulate a file and sent to number of remote system. I ported that exact script to my local machine but I don't see anything going out. Peeking into the script, I see no special module being

DBI question

2008-05-21 Thread Ken Foskey
I have a program that will run literally for days and days. It monitors logs by file tail. Problem is that I think the DBI is causing problems. It is constantly connecting and reconnecting to DB2 for every transaction. What I would like to do is block the subroutine and check the DBI

Re: DBI question

2008-05-21 Thread Ken Foskey
On Wed, 2008-05-21 at 23:53 +1000, Ken Foskey wrote: I have a program that will run literally for days and days. It monitors logs by file tail. Problem is that I think the DBI is causing problems. It is constantly connecting and reconnecting to DB2 for every transaction. The original did

Re: Opening a File in its Native Application

2008-04-25 Thread Ken Foskey
On Fri, 2008-04-25 at 10:09 -0700, Lynn Etheredge wrote: Hi, I would like to create a button on a web page that opens a file in it's application (ie. open a scientific file in it's native application). My file does not have an extension and so I think it probably will not open automatically

Re: problem with the script in counting

2008-04-05 Thread ken Foskey
On Sun, 2008-04-06 at 05:39 +0530, pradeep reddy wrote: Can this impletemented in shell script alsso? Why do you ask this in a perl list? look at `uniq -c`. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: dinamic cgi with perl

2008-04-03 Thread ken Foskey
Ajax tutorial in developerworks http://www.ibm.com/developerworks/library/wa-ajaxintro1.html There is also a module cgi::ajax in CPAN that you might want to look at. -- Ken Foskey FOSS developer

Re: Perl Stops Processing

2008-04-03 Thread ken Foskey
in the command shell. http://www.ss64.com/nt/start.html -- Ken Foskey FOSS developer

Re: how do check th argument is passing to running file

2008-03-24 Thread ken Foskey
sample.pl mm; } -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: diff of two files

2008-03-20 Thread Ken Foskey
Sounds like homework not a genuine work query. On Thu, 2008-03-20 at 15:14 +0530, [EMAIL PROTECTED] wrote: Hi All, Can somebody please help me on this??? Regards, Irfan -Original Message- From: Sayed, Irfan Sent: Monday, March 17, 2008 7:52 PM To: beginners@perl.org

Re: How to make all files in one directory to an array

2008-03-20 Thread Ken Foskey
On Thu, 2008-03-20 at 18:20 +0530, sivasakthi wrote: Hi all, How to form array by using the files available in particular directory ? for example, /tmp contains the following files.. #ls /tmp example.txt file1.txt file2.txt file3.txt sample.txt www.txt zzz.txt i want to take

Re: xml::twig help

2008-03-18 Thread ken Foskey
Updated to fix memory problem, you have to purge. Takes over 30 minutes for 120K records. I am sure that the whole process can be done better with a good understanding of the module. Will benchmark XML::Rules though. On Tue, 2008-03-18 at 00:55 +1100, Ken Foskey wrote: I am extracting

Re: xml::twig help

2008-03-18 Thread ken Foskey
. Definitely worth the time learning XML::Twig. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

xml::twig help

2008-03-17 Thread Ken Foskey
I am extracting addresses from an XML file to process through other programs using pipe delimiter the following code works but this is going to get 130,000 records through it it must be very efficient and I cannot follow the documentation on the best way to do this. After this simple one is

Re: dinamic cgi with perl

2008-03-14 Thread Ken Foskey
On Fri, 2008-03-14 at 15:14 +0100, Pau Marc Munoz Torres wrote: To solve it i was thinking on introduce a javascript code into my cgi, but i don't know how to pass the variable info between perl and javascript. AJAX - I ended up hand coding my AJAX from scratch but there is a module that I

Re: How do I get the contents of a url?

2008-03-12 Thread ken Foskey
to this despite looking quite a bit. thanks use WWW::Mechanize; Look it up on http://search.cpan.org -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: FTP server

2008-03-08 Thread ken Foskey
of usernames/passwords than those of the system. Is it possible? Thank you. If the remote user creates a key you can add that key into a userid on the receiving box. scp myfile.txt [EMAIL PROTECTED]:/my/directory/path http://polishlinux.org/apps/ssh-tricks -- Ken Foskey FOSS developer

Re: Are comments allowed before package declarations in modules?

2008-02-26 Thread ken Foskey
practices book recommends that the documentation (POD) appears at the end of the module. I don't personally like this recommendation because it makes it easier for the programmer to forget to maintain the documentation. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: How to get error?

2008-01-14 Thread Ken Foskey
in bworser window? Or where are error logs stored? I find that this is caused by the failure to put out CGI headers properly and Apache then says that it is not formed correctly. Search your apache log and find the actual messages. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL

Re: Controlling external I/O with Perl

2008-01-13 Thread Ken Foskey
using Windows or Unix or other operating system. What type of IO are you using? Serial, parrallel, etc. The answers will probably come from http://search.cpan.org -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: How to select from a popup_menu without clicking submit?

2008-01-07 Thread Ken Foskey
'); } This is a very basic thing if you allow a submit button, but I don't want to do that. Any ideas? This might be CGI::Ajax. I have hand coded my ajax so far, it requires javascript knowledge and a real clue stick (mastering ajax on developerworks was my starting point). -- Ken Foskey FOSS

Re: How to select from a popup_menu without clicking submit?

2008-01-07 Thread Ken Foskey
that you wanted to track what the user was doing and report centrally on the server. If that is the case then you must bring that information back somehow AJAX is just one way of doing this. What are you actually trying to achieve? What do you know up front? How much does information change? -- Ken

Re: Ftp to GDG dataset

2007-10-11 Thread Ken Foskey
mainframes.) Is your gdg base properly defined? Have you set the site command to specify the correct line lengths? -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: How to insert data onto an existing XML file

2007-10-03 Thread Ken Foskey
. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Limiting a program to a single running instance

2007-10-03 Thread Ken Foskey
-0.07/lib/Sys/RunAlone.pm Another design for this sort of thing is a mutex. There are a few modules for this. This means you can lock out smaller parts of code and keep two copies running concurrently doing different work. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL

Re: Strange error

2007-09-25 Thread Ken Foskey
? backatcha.cgi -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Process ID

2007-09-24 Thread Ken Foskey
into the loop. open( $process, '|-', $command ) or croak Unable to create process $command, $!; while( $line = $process ) { print $log $line; } close( $process ); -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: CSV file

2007-09-21 Thread Ken Foskey
way to do it?Also I need to bold the header in my CSV. CSV is comma separated variable. It is a text format and therefore cannot be 'bold'. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: PERL/LDAPS

2007-09-19 Thread Ken Foskey
error messages have you got? -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: parsing csv-file for inserting in database

2007-09-17 Thread Ken Foskey
, and newlines: In this case I would use: http://search.cpan.org/~hmbrand/Text-CSV_XS-0.31/CSV_XS.pm I can then set the sep_char in new. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: parsing csv-file for inserting in database

2007-09-16 Thread Ken Foskey
it will divide the output for every character. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: unable to use perl script with post on university wireless network

2007-09-15 Thread Ken Foskey
input and see if that completes the process. Run the script in debugging to find out what it is doing: perl -d script -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: want to make a list of all users connected to a network

2007-09-09 Thread Ken Foskey
lookup. I would start with a search.cpan.org on DNS. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: spliting

2007-09-04 Thread Ken Foskey
60 bytes of the file at a time. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Transform my algorithm in perl. Ideas?

2007-09-03 Thread Ken Foskey
which is old likewise of 10 days in perl? Please post what you have done and we can help, otherwise there are many sites on the Internet to hire a contractor for a small job. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: type comparison in perl

2007-08-31 Thread Ken Foskey
On Fri, 2007-08-31 at 15:08 -0400, Hunter Barrington wrote: is there a type() function in perl? i need to be able to test the contents of an array and if (type($value)=='string' or type($value)=='int') {print i win;} if( $value =~ m/^\d+$/ ) { print I am a number\n; } -- Ken Foskey FOSS

Re: Parsing qmail-qread data

2007-08-31 Thread Ken Foskey
$count++; } print Count $count\n; } } -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Printing asterisks in screen

2007-08-25 Thread Ken Foskey
it says. if ((6 = 1 6 = 30) # yes this works { for (my $i=1 ; $i 30 ; $i++) { while (6 == $i) # infinite loop because $i does not change. { print *; } } } -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED

modification

2007-08-20 Thread Ken Foskey
, $array[0]; and this causes a non numeric warning. Is there a 'better' way to do this. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: modification

2007-08-20 Thread Ken Foskey
peeve is 'use warnings' and then not cleaning them up. -- Ken Foskey FOSS developer * Just because it is tested and has been in production does not mean it is not wrong. :-) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Array to Hash

2007-08-13 Thread Ken Foskey
way to do it? This is not elegant in this example but it possibly is the answer you are looking for. my %ages{ 'alice', 'bob', 'charles'} = @r; -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Array to Hash

2007-08-13 Thread Ken Foskey
On Mon, 2007-08-13 at 07:47 -0700, Paul Lalli wrote: On Aug 13, 9:40 am, [EMAIL PROTECTED] (Ken Foskey) wrote: On Sun, 2007-08-12 at 22:55 -0400, yitzle wrote: I got an array of values where the order is relevent, eg the ages of Alice, Bob and Charles, and I want to make a hash out

Re: New to Perl

2007-08-10 Thread Ken Foskey
it? b) How to install it on my PC Perl package manager or ppm. This is the ActiveState version of cpan. http://aspn.activestate.com/ASPN/docs/ActivePerl/5.8/faq/ActivePerl-faq2.html -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: How to read a very large file??

2007-08-08 Thread Ken Foskey
then after some time it reads the same line also , so it take more time it is a waste of time.. Look up File::Tail in CPAN. If you are trying to follow the file as it grows then this is what you want. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: Detect Html

2007-08-08 Thread Ken Foskey
. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Passing each of the files in a directory as parameter to the perl script

2007-08-08 Thread Ken Foskey
. In most systems I have worked on the /tmp directory is a different file system. Sometimes the time taken to move the file from one file system to another is significant enough to cause problems on a fully loaded system. This solution may break on systems under excessive load. -- Ken Foskey FOSS

Re: customizing eof chatacter

2007-08-06 Thread Ken Foskey
order and it is not that hard. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

use of end

2007-08-06 Thread Ken Foskey
I have a script that must update the reconciliation system using a module. From a design perspective how safe is it to use DB2 updates in an END block? -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: customizing eof chatacter

2007-08-05 Thread Ken Foskey
Unable to open MYMacFile.txt $!; while( $input ) { ... } close( $input ); } -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: automatically open ports

2007-08-04 Thread Ken Foskey
to reconfigure a router then it is possible that you would connect to the router webserver and reconfigure it. I have to say I would not recommend this, you have lag between reboot and rebuild for a start. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Cygwin like Module in perl

2007-08-04 Thread Ken Foskey
differences. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: automatically open ports

2007-08-03 Thread Ken Foskey
brought up and closed automatically before and after use? -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: FILEHANDLE problem

2007-08-02 Thread Ken Foskey
and put into another file for processing. I found File::Tail dead easy and it has been running for months monitoring transmission logs on our servers at work. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http

Re: Problem with my code

2007-08-02 Thread Ken Foskey
predictable: foreach my $key (sort keys %hash) { print $OUT_FILE $hash{$key}; } -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: FW: Html within code

2007-07-29 Thread Ken Foskey
cryptic. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: reading from a file

2007-07-24 Thread Ken Foskey
propose you will eventually miss lines from the file, tail -f wont. I have used File::Tail successfully as recommended by Angerstein. It has run for months without issue or missing a beat. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: connect a database in remote server (can connect to the server via SSH)

2007-07-18 Thread Ken Foskey
use. http://perltraining.com.au/talks/dbdproxy.pdf -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Fork()ing and CGI?

2007-07-17 Thread Ken Foskey
reading up on AJAX that seems to be the correct solution to the problem and makes for some slick applications. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

RE: Spreadsheet::WriteExcel problem with large file

2007-07-16 Thread Ken Foskey
On Mon, 2007-07-16 at 14:23 -0700, a_arya2000 wrote: I have like around 24K rows. Thank you. Sounds like a design problem. Use a database and connect the excel spreadsheet to that data source. Seems a lot easier. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED

Re: obtaining file properties

2007-07-14 Thread Ken Foskey
module. However that would just return the attributes. Im looking to find size and create date/time. Could someone point me in a good direction so I can read into further? I appreciate the help, size is dead easy -s filename -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL

Re: Dynamically loading perl code

2007-07-13 Thread Ken Foskey
On Fri, 2007-07-13 at 08:37 -0400, Mr. Shawn H. Corey wrote: If you want to run scripts, you should use system(). See `perldoc -f system` or: open( PROG, '|-', 'myscript.sh options' ) or die ... while( PROG ) { } close PROG if( $? ) { die I have failed; } -- Ken Foskey FOSS developer

Re: Global symbol $var1 requires explicit

2007-07-08 Thread Ken Foskey
requires explicit package name at sample.pl line 4. Global symbol $var2 requires explicit package name at sample.pl line 5. Execution of sample.pl aborted due to compilation errors. Thanks, Rajeev Kilaru -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Global symbol $var1 requires explicit

2007-07-08 Thread Ken Foskey
On Sun, 2007-07-08 at 15:43 -0700, Paul Lalli wrote: On Jul 8, 1:25 pm, [EMAIL PROTECTED] (Kilaru Rajeev) wrote: On 7/8/07, Ken Foskey [EMAIL PROTECTED] wrote: On Sun, 2007-07-08 at 22:27 +0530, kilaru rajeev wrote: Please explain me whats wrong with the following code

Re: help with syntax using an if statement

2007-07-04 Thread Ken Foskey
. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Problem with runaway format

2007-07-01 Thread Ken Foskey
On Sun, 2007-07-01 at 05:40 -0400, Mathew Snyder wrote: I have a script which places data 4 levels deep in a HoHoHoH. It grabs tickets in our ticket system using the systems API and places attributes about each piece of activity into the hash. The has is called %tickets. It looks like

Re: Parsing a file within a jar file

2007-06-27 Thread Ken Foskey
On Wed, 2007-06-27 at 08:11 -0500, Daniel W. Hurn wrote: Does anyone have any suggestion on how to examine/parse a file within a jar file? jar is a java file and I think it is simply a zipped file. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional

Re: Reading a particular line from a file

2007-06-20 Thread Ken Foskey
is then manipulated and I can read the records in new order by doing a seek. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Iterate through a hashref using XML::Simple (real post)

2007-06-15 Thread Ken Foskey
70,000 statements containing LOTS of details in them? I need to process this statement by statement but it would totally blow memory. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Removing decimal points

2007-06-10 Thread Ken Foskey
On Fri, 2007-06-08 at 19:52 +, ash wrote: Hello there! I need to remove decimal points from numbers. For eg 1.23 or 1.77 would be just 1. Any suggestion is appreciated. Thank you. $i = 1.77; $j = int $i; print $j; -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL

Re: CPAN and Windows

2007-06-01 Thread Ken Foskey
for windows? Look for ppm Perl Package Manager and install with that. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: Outlook CSV Parser

2007-05-30 Thread Ken Foskey
? Is there another format available? I doubt a simple regex will do it if the CSV modules do not work. What data do you have problems with? Without samples there is nothing we can do. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: RegEx again

2007-05-20 Thread Ken Foskey
if ( grep $searchRegEx, @list1 ); print 2 if (grep $searchRegEx, @list2); Problem is you need slashes. print 2 if (grep /$searchRegEx/, @list2); I also wonder why you did not use the simpler: $searchRegEx = '^('. join( '|',@keywords ). ')$'; -- Ken Foskey FOSS developer -- To unsubscribe, e-mail

overriding posix::uname

2007-05-18 Thread Ken Foskey
sub is_dev { my ($server, $host) = POSIX::uname(); if ($host eq aixmbk10) { return 1; I want to test this module in a test script. SO I want to code the various servers and check that it works. Is there a way to override the call to POSIX::uname Thanks Ken --

Re: File Handling. Reading and Writting.

2007-05-15 Thread Ken Foskey
It looks as if you're trying to edit a text file in place. Although that's possible for some simple cases, it's generally easier to use Perl's $^I functionality. What is $^I? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Thoughts on comments

2007-05-15 Thread Ken Foskey
On Mon, 2007-05-14 at 02:16 -0400, Mathew Snyder wrote: Is it possible to use too many comments? I'm looking at a script I wrote and think I may have made it less clear by trying to make it more clear. Absolutely. Commenting in a useful clear way I believe takes years to master. Maintaining

Re: About a reg expression ?:

2007-05-13 Thread Ken Foskey
: */**a (?:black|grey|white) cat/* Try this: * Regex Coach ( http://weitz.de/regex-coach/ ) Nice to explain how things work -- Ken Foskey FOSS developer PS: Thanks goes to http://perltraining.com.au/ for showing me this one. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands

Re: regexp ...

2007-05-12 Thread Ken Foskey
On Fri, 2007-05-11 at 10:46 -0700, oryann9 wrote: Funny I had to explain split /|/, $str returning an array of characters. -- Ken Foskey FOSS developer Excellent Ken, thank you, but why the pipe | and how does this differ from ' ' or \s+. I used Dumper and it showed

Re: regexp ...

2007-05-11 Thread Ken Foskey
/|/, $str returning an array of characters. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

hash containing a hash, sorting keys help

2007-05-05 Thread Ken Foskey
of processes on a unix server usage: visualise.cgi user=username =head1 DESCRIPTION Use the PS command to generate a tree of commands on a Unix server. =head1 AUTHOR Ken Foskey =head1 COPYRIGHT Copyright 2007 Salmat =cut use warnings; use strict; use CGI qw(:standard); use Data::Dumper

Re: hash containing a hash, sorting keys help

2007-05-05 Thread Ken Foskey
On Sat, 2007-05-05 at 07:19 -0700, Tom Phoenix wrote: On 5/5/07, Ken Foskey [EMAIL PROTECTED] wrote: foreach my $child (sort keys( $parent{$pid} )) { dump_process( $child ); } Type of arg 1 to keys must be hash (not hash element) at ./visualise.cgi line 46, near

Re: file lists and diffs?

2007-05-04 Thread Ken Foskey
command or some such. Has anyone done such a thing or know of a module I should look at to achieve this? You might want to look at the rsync command rather than rolling your own. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: regular expression

2007-05-04 Thread Ken Foskey
On Sat, 2007-05-05 at 01:01 +0200, xavier mas wrote: HI list!, I have a file with labels and a small text inside. When this text is different of a pattern text (n, for instance), this label must be deleted, for instance: labelf/label(more text)labeln/label(more text)labelmpl/label...

really bad use of postfix

2007-04-28 Thread Ken Foskey
) { exec_rqst('stga2k_vps.pl',$FileNameIn); } else { exec_rqst('stga2kif.sh',$FileNameIn); } -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: File::Basename issues

2007-04-28 Thread Ken Foskey
/share/directory Activestate is a perl implementation that is straight windows if you like. This might be a better fit to your task. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: File::Basename issues

2007-04-26 Thread Ken Foskey
On Wed, 2007-04-25 at 17:15 -0700, Nishi wrote: Hi: The File::Basename from 5.8.0 doesnot work in Perl 5.8.2 or Perl 5.8.7. Is there any particular reason. Are yhou using activestate or cygwin perl. cygwin will do that because the filename you provided is not a cygwin filename. cygpath

Re: Perl error

2007-04-26 Thread Ken Foskey
On Wed, 2007-04-25 at 10:20 -0500, Kevin Viel wrote: Thanks. I have been using this program without problem for a while, I'd like to say over a year, but I am not sure. So, could it be that somehow the environment path variable relating to perl had been changed? Otherwise, I

Re: Test of scripts with Test::More

2007-04-26 Thread Ken Foskey
=4 et cin: # $Id: SafeMove.t,v 1.2 2006/04/24 02:43:07 foskey Exp $ =head1 NAME SafeMove.t =head1 DESCRIPTION Ensure that the SafeMove module is functioning correctly. =HEAD1 AUTHOR Ken Foskey =cut # Libraries use strict; use warnings; use Test::More; use File::Temp; use File::Basename; use

Re: Mails should not go in SPAM Box

2007-04-12 Thread Ken Foskey
is supposed to come from ie internal.mydomain.com.au and it fails because this is not a public machine address. Solution was to fiddle the email address to remove the machine name. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: Dialog and Tempfiles in Perl

2007-04-11 Thread Ken Foskey
On Wed, 2007-04-11 at 12:09 -0300, Rodrigo Tavares wrote: Hello, I like to know, if exist anything as tempfile and http://search.cpan.org/~tjenness/File-Temp-0.18/Temp.pm dialog program in Perl. http://search.cpan.org/~uncle/Dialog-0.03/Dialog.pod There are many other better solutions

Re: Sorting dir output

2007-04-10 Thread Ken Foskey
to help you. For a simplification of the other process you can use opendir function to read the files in a directory one by one and then issue the stat as in the other answer. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL

Re: How to source another perl-file into one

2007-04-08 Thread Ken Foskey
, and in perl? Thanks for any ideas and help. Modules is what you are after. create your subroutines or definitions that you want to use in a file called xyz.pm (xyz should be something meaningful) use lib '/where/my/module/is/'; use xyz -- Ken Foskey FOSS developer -- To unsubscribe, e-mail

Re: MS Word translation

2007-04-03 Thread Ken Foskey
On Tue, 2007-04-03 at 11:56 +0800, Jen mlists wrote: Hello, Would you please tell me what's the correct module for translating a word document to the plain text?Thanks. There is a Perl Interface in OpenOffice.org that might be useful for you. -- Ken Foskey FOSS developer

Re: Calling bash things inside perl script.

2007-04-03 Thread Ken Foskey
and use them in a perl script.I am not sure how to do this.I did a cpan search but did not find anything helpful. Any idea how to do this ? look up dotsh it has some ability to integrate shell and perl. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED

zoned decimal

2007-03-26 Thread Ken Foskey
Is there a module that deals with zoned decimal from the mainframe '}' is plus zero for example, after it is converted to ASCII? Convert::IBM390 only seems to handle it in ebcdic format and it is already mucked up before we get the file. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail

Re: perldoc -q How can I make my Perl program run faster?

2007-03-24 Thread Ken Foskey
your time looking to tenths of a second spend it on answering another business question that may make thousands of dollars. -- Ken Foskey FOSS developer -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/

Re: GUI with Perl

2007-03-17 Thread Ken Foskey
On Thu, 2007-03-15 at 23:33 -0400, yitzle wrote: TIme for a quick factoid about me: I'm running Perl off Cygwin. No Gnome installed here. GTK is available on Windows, I am reasonably sure it is in cygwin as well. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: Question about system call

2007-03-13 Thread Ken Foskey
On Tue, 2007-03-13 at 02:29 -0400, Mathew wrote: I recently forgot about the unlink function and had been trying to remove files using the less efficient system call to run rm -f /path/to/files. I found, however, that this didn't work at all. I've since replaced it with unlink and get the

Re: private method

2007-03-04 Thread Ken Foskey
On Sun, 2007-03-04 at 14:31 +0100, D. Bolliger wrote: Chas referred to a _convention_ - which does not enforce privacy. IMO it's useful, otherwise it would not be widely used, and for example, Test::Pod::Coverage would require subroutines starting with an underscore to be documented. :-)

  1   2   >