Re: perl, web based text editors available?

2002-10-23 Thread zentara
On Tue, 22 Oct 2002 09:34:27 -0400, [EMAIL PROTECTED] (Steveo)
wrote:

I have a small dynamic website I wrote in perl.  All news and stuff is 
entered through a web accessible backend page and the data is written to a 
series of flat ascii text files.  When I make a mistake in entering data, 
or if I want to change most data, I have to shell in and edit it with vi 
(no big deal).  What I'd like to know is if there are simple web based text 
file editors (written in perl) out there that I can integrate into my 
website so I can edit these raw files over the web instead.

I had been thinking of writing a cgi script that would allow you to pick 
any one of a predetermined set of data files to pull into a text area box 
that could be edited and then returned as a form to over-write the old 
version.  It seems simple enough to read a text file into a webpage, but 
I'm not sure that the I know how to return the edited file to the webserver 
in the exact same format as it was retrieved.

There are quite a few of those cgi-commandline scripts out there.
Do a google search for cgi commandline or shell cgi.

But you can save yourself some time, this is about the nicest one
out there.
ispsy.cgi
http://NISoftware.com/ispy.cgi

Beware: these are all security risks, You should rename the cgi
to something other than the default, or ideally disable it after
you are done.

You really should consider  keeping a separate
ssh connection going, to do your edits in. Is it that
hard to have ssh going in an xterm or terminal?








-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




An if statement

2002-10-23 Thread Octavian Rasnita
Hi all,

I want to create an if statement like:

if (-e $file) {
for($i = 0; $i  10; $i++) {
sleep(1);
}
unlink $file;
}

Please tell me what will happen if in this period of time (10 seconds)
another page visitor, or program will delete $file.

Will this script try to delete a non existent $file?

Will the script check the if statement for each function under it, so it
will see that there is no $file, or I should use:

unlink $file if -e $file;

Thanks.

Teddy's Center: http://teddy.fcc.ro/
Email: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: An if statement

2002-10-23 Thread Gary Stainburn
On Wednesday 23 Oct 2002 1:47 pm, Octavian Rasnita wrote:
 Hi all,

 I want to create an if statement like:

 if (-e $file) {
 for($i = 0; $i  10; $i++) {
 sleep(1);
 }
 unlink $file;
 }

 Please tell me what will happen if in this period of time (10 seconds)
 another page visitor, or program will delete $file.

 Will this script try to delete a non existent $file?

 Will the script check the if statement for each function under it, so it
 will see that there is no $file, or I should use:

unlink $file if -e $file;

if (-e $file) {  
  for($i = 0; $i  10; $i++) { 
sleep(1);
  }
  unlink $file;
}

The if statement controls access to the block following it.  The condition is 
only checked once, so the answer to the first part is yes - if another 
program deletes the file within the 10 seconds your script will try to delete 
a non-existant file.

unlink $file if -e $file;

This will do what you want, and if another prog does delete the file in during 
the sleep the unlink won't be called.  BTW, why do you want the 10 second 
pause anyway?  

Also, why don't you simply use 'sleep 10' instead of creating the loop?


 Thanks.

 Teddy's Center: http://teddy.fcc.ro/
 Email: [EMAIL PROTECTED]

-- 
Gary Stainburn
 
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: CGI.pm param question

2002-10-23 Thread Ovid
--- Nikola Janceski [EMAIL PROTECTED] wrote:
 is there a function that does this or something similar in CGI.pm?
 
 ## print start_form and other stuff
 
 print map { hidden($_, param($_)) } param(); # pass remaining info
 
 ## end form stuff here
 
 PS. what's the easiest way to pass parameters that have more than one value
 using a similar method above?
 
 Nikola Janceski

As I don't know exactly what you are asking, I can only guess as to your meaning.

I *think* what you are asking is how do I maintain my variables from one invocation 
of the script
to the next?  The good news it, if you're using CGI.pm's html generating functions, 
this is done
for you (usually).  If, however, those parameters are elsewhere, then it seems to me 
that you want
hidden fields to hold all of the form values.  If so, this is easy.  The CGI::hidden 
function will
conveniently output all of the hidden fields necessary to contain your form values.  
Here's a
two-line demonstration:

use CGI qw/:standard/;
print hidden( $_ ) foreach param();

Save that as 'test.pl' and run it as follows:

 perl test.pl color=red color=green name=Ovid

You should get output similar to the following (I've changed the output to show each 
hidden field
on a separate line):

input type=hidden name=color value=red /
input type=hidden name=color value=green /
input type=hidden name=name value=Ovid /

Note that there is one hidden field for each paramter (a total of three), even though 
only two
parameters, 'color' and 'name', were supplied.  And yes, the param() function only 
returns the
names of the two parameters, not a list comprised of qw/ color color name /.

Cheers,
Ovid

=
Ovid on http://www.perlmonks.org/
Someone asked me how to count to 10 in Perl:
push@A,$_ for reverse q.e...q.n.;for(@A){$_=unpack(q|c|,$_);@a=split//;
shift@a;shift@a if $a[$[]eq$[;$_=join q||,@a};print $_,$/for reverse @A

__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




export inside perl

2002-10-23 Thread Elanchezhian Sivanandam
hi,
  i did exported some values inside perl (using shell command 
export) but didn't get reflected in the shell after execution of the 
script. How to do it???

thanks

--
cheers../elan

visit www.tamil.net for tamil fonts


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Crypt::CBC w/Crypt-DES

2002-10-23 Thread Toby Stuart
thanks that did it.
i always forget to binmode things :(

cheers

toby

 -Original Message-
 From: John W. Krahn [mailto:krahnj;acm.org]
 Sent: Wednesday, October 23, 2002 4:26 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Crypt::CBC w/Crypt-DES
 
 
 Toby Stuart wrote:
  
   Hi All,
 
 Hello,
 
   I'm trying to encrypt/decrypt a text file using Crypt::CBC 
 with DES.
  
   The encryption works fine but the decryption seems to yield
   only the first  few bytes of the original text.  I'm sure 
 i'm missing
   something simple.
 
 
 perldoc -f binmode
 
 
 
 John
 -- 
 use Perl;
 program
 fulfillment
 
 -- 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: export inside perl

2002-10-23 Thread John W. Krahn
Elanchezhian Sivanandam wrote:
 
 hi,

Hello,

i did exported some values inside perl (using shell command
 export) but didn't get reflected in the shell after execution of the
 script. How to do it???


perldoc -q environment

Found in /usr/lib/perl5/5.6.0/pod/perlfaq8.pod
   I {changed directory, modified my environment} in a perl
   script.  How come the change disappeared when I exited the
   script?  How do I get my changes to be visible?

   Unix
   In the strictest sense, it can't be done --
   the script executes as a different process
   from the shell it was started from.  Changes
   to a process are not reflected in its parent,
   only in its own children created after the
   change.  There is shell magic that may allow
   you to fake it by eval()ing the script's
   output in your shell; check out the
   comp.unix.questions FAQ for details.


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




uppercase

2002-10-23 Thread Javeed SAR
Hi All,

I have a script which accepts input from keyboard,here it is $label_tag, i
want to convert it to upper case, if the input  from keyboard is given in
lowercase, in my script?
How to do that?


print \n\nENTER THE LABEL NAME:\n;
my $label_tag=;
chomp$label_tag;




RE: uppercase

2002-10-23 Thread Timothy Johnson

perldoc -f uc

-Original Message-
From: Javeed SAR [mailto:SAR.Javeed;sisl.co.in]
Sent: Wednesday, October 23, 2002 1:17 AM
To: [EMAIL PROTECTED]
Subject: uppercase


Hi All,

I have a script which accepts input from keyboard,here it is $label_tag, i
want to convert it to upper case, if the input  from keyboard is given in
lowercase, in my script?
How to do that?


print \n\nENTER THE LABEL NAME:\n;
my $label_tag=;
chomp$label_tag;


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: XML perl mailing list

2002-10-23 Thread NYIMI Jose (BMB)
http://lists.perl.org/showlist.cgi?name=perl-xml


José.

 -Original Message-
 From: Melanie Rouette [mailto:mrouette;omnisig.com] 
 Sent: Tuesday, October 22, 2002 10:04 PM
 To: [EMAIL PROTECTED]
 Subject: XML perl mailing list
 
 
 Hi,
 How do I subscribe to the perl xml mailing list?
 thanks
 
 
 -- 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




daft regex question

2002-10-23 Thread dan
ok, here's another weird question. i have, in a string, the value (or
nickname) ][v][orpheus. This gets set to $pnick as such:

$pnick = lc(substr($sockstr[0],1));

which then makes $pnick = ][v][orpheus. lower down the procedure, i have
an event,

$chandat{$pchan}-{nicks} =~ s/\b$pnick//;
$chandat{$pchan}-{nicks} =~ s/  / /;

which removes the value of $pnick from the hash $chandat{$pchan}-{nicks}.
now, if the value $pnick has any [ ] { } \ / or |, perl returns an error,
and the program shuts down. i tried to fix this problem with this:

$pnick =~ s/\|/\\\|/g;
$pnick =~ s/\[/\\\[/g;
$pnick =~ s/\]/\\\]/g;
$pnick =~ s/\\//g;
$pnick =~ s/\}/\\\}/g;
$pnick =~ s/\{/\\\{/g;

but running all that, returns this error:

 /\b\\]\\[v\\]\\[orpheus/: unmatched [] in regexp at newservice.pl line 292,
SOCK line 118.

i can't figure out a way (or regex method) i would use to replace [ with
\[, ] with \], etc.. any clues?

dan


this is the entire routine
note: at this point:
@sockstr = :nickname PART #channel

__ start __
$pnick = lc(substr($sockstr[0],1));
$pchan = lc($sockstr[2]);
debugmsg(sockstr for part - @sockstr);
$pnick =~ s/\|/\\\|/g;
$pnick =~ s/\[/\\\[/g;
$pnick =~ s/\]/\\\]/g;
$pnick =~ s/\\//g;
$pnick =~ s/\}/\\\}/g;
$pnick =~ s/\{/\\\{/g;
$chandat{$pchan}-{nicks} =~ s/\b$pnick//;
$chandat{$pchan}-{nicks} =~ s/  / /;
__ end __



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




How to run

2002-10-23 Thread Sent To
Hi

How can I run perl scrip on windows?
Is ther any software I need to install and what file extension should i use?
Thanks

regards
sentor
-- 
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: using 'map' with mixture of scalars and array refs...

2002-10-23 Thread Michael Hooten
Simpler and easier to read:
@combined = map { ref $_ eq 'ARRAY' ? @$_ : $_ } values %{$hash{family}};

Either dereference the array or return the scalar.

-Original Message-
From: Peter Scott [mailto:peter;PSDT.com]
Sent: Tuesday, October 22, 2002 10:51 AM
To: [EMAIL PROTECTED]
Subject: Re: using 'map' with mixture of scalars and array refs...


In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Michael Kavanagh) writes:
Hi there,

I've got a hash that has keys which contain either
- array references
- scalar values

for example:
@values = (12398712984, 19286192879);
$hashofarrays{'family'}{'arrayref'} = \@values;
$hashofarrays{'family'}{'scalar'} = 12938712938;

Well, it's not the keys that contain that, it's the values...

I'm trying to map the hash into another array that would just be a
flattened
list of values. (a combination of the scalar values and the individual
array
values)

I'm iterating through each key in the hash and then using 'map' on the key
to do this at the moment.

I can get it to work for all the array references by mapping on the
de-referenced array ref, like this:
   map { push @items,  $_  }  ( @{$hashofarrays{'family'}{'arrayref'} }
);

That doesn't look like code that's iterating through the keys.  You have a
single hardcoded key.

But that ignores all the scalar values...it only gets the keys that contain
array references.

To get the scalars, the following works:
   map { push @items,  $_  }  ( $hashofarrays{'family'}{'scalar'} );

There's only one scalar there and hence the map is superfluous.

Is there an elegant / idiomatic way to do both at once?
I'm guess I could do it using a conditional that checks the hash value and
executes one of the above statements as I iterate through the hash keys,
but
if theres a better way...

@combined = map { @{$_-{arrayref}||[]}, exists $_-{scalar} ? $_-{scalar}
: ()  }
 values %hashofarrays;

--
Peter Scott
http://www.perldebugged.com





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Using non-standard characters...

2002-10-23 Thread Fogle Cpl Shawn B
Sorry about the incorrect syntax's, I'll put a little more time into
preparing my question before I send out another one. The problem is now
fixed though.

Thanks for your help,

shawn

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: How to run

2002-10-23 Thread Beau E. Cox
Hi -

1) get ActiveState perl at http://www.activestate.com/Products/ActivePerl/
click the download button at the upper left, follow the
instructions, use the defaults - easy, fast, simple.

2) normally use the extension .pl for perl scripts.

3) to run your script, open a command prompt and type

perl myscript.pl [arguments...]

ActiveState also has a mailing list for win32/ActivePerl
users.

Welcome to the wonderful world of Perl!

Aloha = Beau.

-Original Message-
From: Sent To [mailto:sento;mail.com]
Sent: Tuesday, October 22, 2002 3:08 PM
To: [EMAIL PROTECTED]
Subject: How to run


Hi

How can I run perl scrip on windows?
Is ther any software I need to install and what file extension should i use?
Thanks

regards
sentor
--
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Splitting A large data file

2002-10-23 Thread Todd W

James Kipp wrote:

I am working on a Windows NT box and I don't have the luxury of any file
splitting utilities. We have a data file with fixed length records. I was
wondering the most efficient way of splitting the file into 5 smaller files.
Thought ( Hoping :-) ) some one out there may have done something like this.


Thanks !!


#!/usr/bin/perl -w

use strict;

# call new() with named args found in init() to override defaults
my( $fSpliter ) = Text::FileSplitter-new();

$fSpliter-split();

print( done!\n );

package Text::FileSplitter;
use strict;
use IO::File;

sub new {
  my($class, %args) = @_;
  my($self) = bless( { %args }, $class );
  $self-init();
  return( $self );
}

sub init {
  my($self) = shift(); my($filehandles) = [];

  $self-{ file } ||= './splitfile.txt';
  $self-{ output_prefix } ||= ( ($self-{ file } =~ /(\w+)/) and $1 );
  $self-{ file_count }  ||= 5;
  $self-{ record_length }  ||= 10;

  $self-{ fh } = IO::File-new(  $self-{ file } )
or die(open $self-{ file }: $!);

  foreach ( 1 .. $self-{ file_count } ) {
push(
  @{ $filehandles },
  IO::File-new( $self-{ output_prefix }.$_)
);
  }
  $self-{ ofh } = $filehandles;

}

sub split {
  my($self) = shift(); my($buffer);
  my($counter) = 0;
  while ( sysread $self-{ fh }, $buffer, $self-{ record_length } ) {
$self-{ ofh }[ $counter % $self-{ file_count } ]-print( $buffer );
$counter++;
  }
}

HTH

Todd W.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Splitting A large data file

2002-10-23 Thread Todd W

James Kipp wrote:

I am working on a Windows NT box and I don't have the luxury of any file
splitting utilities. We have a data file with fixed length records. I was
wondering the most efficient way of splitting the file into 5 smaller files.
Thought ( Hoping :-) ) some one out there may have done something like this.


Thanks !!


#!/usr/bin/perl -w

use strict;

# call new() with named args found in init() to override defaults
my( $fSpliter ) = Text::FileSplitter-new();

$fSpliter-split();

print( done!\n );

package Text::FileSplitter;
use strict;
use IO::File;

sub new {
  my($class, %args) = @_;
  my($self) = bless( { %args }, $class );
  $self-init();
  return( $self );
}

sub init {
  my($self) = shift(); my($filehandles) = [];

  $self-{ file } ||= './splitfile.txt';
  $self-{ output_prefix } ||= ( ($self-{ file } =~ /(\w+)/) and $1 );
  $self-{ file_count }  ||= 5;
  $self-{ record_length }  ||= 10;

  $self-{ fh } = IO::File-new(  $self-{ file } )
or die(open $self-{ file }: $!);

  foreach ( 1 .. $self-{ file_count } ) {
push(
  @{ $filehandles },
  IO::File-new( $self-{ output_prefix }.$_)
);
  }
  $self-{ ofh } = $filehandles;

}

sub split {
  my($self) = shift(); my($buffer);
  my($counter) = 0;
  while ( sysread $self-{ fh }, $buffer, $self-{ record_length } ) {
$self-{ ofh }[ $counter % $self-{ file_count } ]-print( $buffer );
$counter++;
  }
}

HTH

Todd W.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Splitting A large data file

2002-10-23 Thread Todd W

James Kipp wrote:

I am working on a Windows NT box and I don't have the luxury of any file
splitting utilities. We have a data file with fixed length records. I was
wondering the most efficient way of splitting the file into 5 smaller files.
Thought ( Hoping :-) ) some one out there may have done something like this.


Thanks !!


#!/usr/bin/perl -w

use strict;

# call new() with named args found in init() to override defaults
my( $fSpliter ) = Text::FileSplitter-new();

$fSpliter-split();

print( done!\n );

package Text::FileSplitter;
use strict;
use IO::File;

sub new {
  my($class, %args) = @_;
  my($self) = bless( { %args }, $class );
  $self-init();
  return( $self );
}

sub init {
  my($self) = shift(); my($filehandles) = [];

  $self-{ file } ||= './splitfile.txt';
  $self-{ output_prefix } ||= ( ($self-{ file } =~ /(\w+)/) and $1 );
  $self-{ file_count }  ||= 5;
  $self-{ record_length }  ||= 10;

  $self-{ fh } = IO::File-new(  $self-{ file } )
or die(open $self-{ file }: $!);

  foreach ( 1 .. $self-{ file_count } ) {
push(
  @{ $filehandles },
  IO::File-new( $self-{ output_prefix }.$_)
);
  }
  $self-{ ofh } = $filehandles;

}

sub split {
  my($self) = shift(); my($buffer);
  my($counter) = 0;
  while ( sysread $self-{ fh }, $buffer, $self-{ record_length } ) {
$self-{ ofh }[ $counter % $self-{ file_count } ]-print( $buffer );
$counter++;
  }
}

HTH

Todd W.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Splitting A large data file

2002-10-23 Thread Todd W

James Kipp wrote:

I am working on a Windows NT box and I don't have the luxury of any file
splitting utilities. We have a data file with fixed length records. I was
wondering the most efficient way of splitting the file into 5 smaller files.
Thought ( Hoping :-) ) some one out there may have done something like this.


Thanks !!


#!/usr/bin/perl -w

use strict;

# call new() with named args found in init() to override defaults
my( $fSpliter ) = Text::FileSplitter-new();

$fSpliter-split();

print( done!\n );

package Text::FileSplitter;
use strict;
use IO::File;

sub new {
  my($class, %args) = @_;
  my($self) = bless( { %args }, $class );
  $self-init();
  return( $self );
}

sub init {
  my($self) = shift(); my($filehandles) = [];

  $self-{ file } ||= './splitfile.txt';
  $self-{ output_prefix } ||= ( ($self-{ file } =~ /(\w+)/) and $1 );
  $self-{ file_count }  ||= 5;
  $self-{ record_length }  ||= 10;

  $self-{ fh } = IO::File-new(  $self-{ file } )
or die(open $self-{ file }: $!);

  foreach ( 1 .. $self-{ file_count } ) {
push(
  @{ $filehandles },
  IO::File-new( $self-{ output_prefix }.$_)
);
  }
  $self-{ ofh } = $filehandles;

}

sub split {
  my($self) = shift(); my($buffer);
  my($counter) = 0;
  while ( sysread $self-{ fh }, $buffer, $self-{ record_length } ) {
$self-{ ofh }[ $counter % $self-{ file_count } ]-print( $buffer );
$counter++;
  }
}

HTH

Todd W.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Splitting A large data file

2002-10-23 Thread Javeed SAR
How to combine it back after split???

Regards 
j@veed





-Original Message-
From: Todd W [mailto:trw3;uakron.edu]
Sent: Thursday, October 24, 2002 10:36 AM
To: [EMAIL PROTECTED]; James Kipp
Subject: Re: Splitting A large data file



James Kipp wrote:
 I am working on a Windows NT box and I don't have the luxury of any file
 splitting utilities. We have a data file with fixed length records. I was
 wondering the most efficient way of splitting the file into 5 smaller
files.
 Thought ( Hoping :-) ) some one out there may have done something like
this.
 
 
 Thanks !!

#!/usr/bin/perl -w

use strict;

# call new() with named args found in init() to override defaults
my( $fSpliter ) = Text::FileSplitter-new();

$fSpliter-split();

print( done!\n );

package Text::FileSplitter;
use strict;
use IO::File;

sub new {
   my($class, %args) = @_;
   my($self) = bless( { %args }, $class );
   $self-init();
   return( $self );
}

sub init {
   my($self) = shift(); my($filehandles) = [];

   $self-{ file } ||= './splitfile.txt';
   $self-{ output_prefix } ||= ( ($self-{ file } =~ /(\w+)/) and $1 );
   $self-{ file_count }  ||= 5;
   $self-{ record_length }  ||= 10;

   $self-{ fh } = IO::File-new(  $self-{ file } )
 or die(open $self-{ file }: $!);

   foreach ( 1 .. $self-{ file_count } ) {
 push(
   @{ $filehandles },
   IO::File-new( $self-{ output_prefix }.$_)
 );
   }
   $self-{ ofh } = $filehandles;

}

sub split {
   my($self) = shift(); my($buffer);
   my($counter) = 0;
   while ( sysread $self-{ fh }, $buffer, $self-{ record_length } ) {
 $self-{ ofh }[ $counter % $self-{ file_count } ]-print( $buffer );
 $counter++;
   }
}

HTH

Todd W.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Splitting A large data file

2002-10-23 Thread Tanton Gibbs
perl -pe  filename1 filename2 filename3 ...  catted_file
- Original Message -
From: Javeed SAR [EMAIL PROTECTED]
To: Todd W [EMAIL PROTECTED]; [EMAIL PROTECTED]; James Kipp
[EMAIL PROTECTED]
Sent: Thursday, October 24, 2002 1:15 AM
Subject: RE: Splitting A large data file


 How to combine it back after split???

 Regards
 j@veed





 -Original Message-
 From: Todd W [mailto:trw3;uakron.edu]
 Sent: Thursday, October 24, 2002 10:36 AM
 To: [EMAIL PROTECTED]; James Kipp
 Subject: Re: Splitting A large data file



 James Kipp wrote:
  I am working on a Windows NT box and I don't have the luxury of any file
  splitting utilities. We have a data file with fixed length records. I
was
  wondering the most efficient way of splitting the file into 5 smaller
 files.
  Thought ( Hoping :-) ) some one out there may have done something like
 this.
 
 
  Thanks !!

 #!/usr/bin/perl -w

 use strict;

 # call new() with named args found in init() to override defaults
 my( $fSpliter ) = Text::FileSplitter-new();

 $fSpliter-split();

 print( done!\n );

 package Text::FileSplitter;
 use strict;
 use IO::File;

 sub new {
my($class, %args) = @_;
my($self) = bless( { %args }, $class );
$self-init();
return( $self );
 }

 sub init {
my($self) = shift(); my($filehandles) = [];

$self-{ file } ||= './splitfile.txt';
$self-{ output_prefix } ||= ( ($self-{ file } =~ /(\w+)/) and $1 );
$self-{ file_count }  ||= 5;
$self-{ record_length }  ||= 10;

$self-{ fh } = IO::File-new(  $self-{ file } )
  or die(open $self-{ file }: $!);

foreach ( 1 .. $self-{ file_count } ) {
  push(
@{ $filehandles },
IO::File-new( $self-{ output_prefix }.$_)
  );
}
$self-{ ofh } = $filehandles;

 }

 sub split {
my($self) = shift(); my($buffer);
my($counter) = 0;
while ( sysread $self-{ fh }, $buffer, $self-{ record_length } ) {
  $self-{ ofh }[ $counter % $self-{ file_count } ]-print( $buffer );
  $counter++;
}
 }

 HTH

 Todd W.


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Splitting A large data file

2002-10-23 Thread Todd W


Javeed Sar wrote:


How to combine it back after split???



perl -e 'print ' splitfile.1 splitfile.2 splitfile.3 splitfile.4 
splitfile.5  splitfile.new.txt

note the ordering is different, because the program below sends the next 
record to the next filehandle in a circle. The above one liner dumps the 
contents of the files sequentially. But if your datafile implementation 
is sound that shouldnt matter.

Todd W.


James Kipp wrote:


I am working on a Windows NT box and I don't have the luxury of any file
splitting utilities. We have a data file with fixed length records. I was
wondering the most efficient way of splitting the file into 5 smaller


files.


Thought ( Hoping :-) ) some one out there may have done something like


this.



Thanks !!



#!/usr/bin/perl -w

use strict;

# call new() with named args found in init() to override defaults
my( $fSpliter ) = Text::FileSplitter-new();

$fSpliter-split();

print( done!\n );

package Text::FileSplitter;
use strict;
use IO::File;

sub new {
   my($class, %args) = @_;
   my($self) = bless( { %args }, $class );
   $self-init();
   return( $self );
}

sub init {
   my($self) = shift(); my($filehandles) = [];

   $self-{ file } ||= './splitfile.txt';
   $self-{ output_prefix } ||= ( ($self-{ file } =~ /(\w+)/) and $1 );
   $self-{ file_count }  ||= 5;
   $self-{ record_length }  ||= 10;

   $self-{ fh } = IO::File-new(  $self-{ file } )
 or die(open $self-{ file }: $!);

   foreach ( 1 .. $self-{ file_count } ) {
 push(
   @{ $filehandles },
   IO::File-new( $self-{ output_prefix }.$_)
 );
   }
   $self-{ ofh } = $filehandles;

}

sub split {
   my($self) = shift(); my($buffer);
   my($counter) = 0;
   while ( sysread $self-{ fh }, $buffer, $self-{ record_length } ) {
 $self-{ ofh }[ $counter % $self-{ file_count } ]-print( $buffer );
 $counter++;
   }
}




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Splitting A large data file

2002-10-23 Thread Tanton Gibbs
Also, there is a CPAN utility for doing this

http://search.cpan.org/author/SDAGUE/ppt-0.12/bin/split
- Original Message -
From: Todd W [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 24, 2002 1:36 AM
Subject: Re: Splitting A large data file




 Javeed Sar wrote:
  
  How to combine it back after split???
 

 perl -e 'print ' splitfile.1 splitfile.2 splitfile.3 splitfile.4
 splitfile.5  splitfile.new.txt

 note the ordering is different, because the program below sends the next
 record to the next filehandle in a circle. The above one liner dumps the
 contents of the files sequentially. But if your datafile implementation
 is sound that shouldnt matter.

 Todd W.

 
  James Kipp wrote:
 
 I am working on a Windows NT box and I don't have the luxury of any file
 splitting utilities. We have a data file with fixed length records. I
was
 wondering the most efficient way of splitting the file into 5 smaller
 
  files.
 
 Thought ( Hoping :-) ) some one out there may have done something like
 
  this.
 
 
 Thanks !!
 
 
  #!/usr/bin/perl -w
 
  use strict;
 
  # call new() with named args found in init() to override defaults
  my( $fSpliter ) = Text::FileSplitter-new();
 
  $fSpliter-split();
 
  print( done!\n );
 
  package Text::FileSplitter;
  use strict;
  use IO::File;
 
  sub new {
 my($class, %args) = @_;
 my($self) = bless( { %args }, $class );
 $self-init();
 return( $self );
  }
 
  sub init {
 my($self) = shift(); my($filehandles) = [];
 
 $self-{ file } ||= './splitfile.txt';
 $self-{ output_prefix } ||= ( ($self-{ file } =~ /(\w+)/) and $1 );
 $self-{ file_count }  ||= 5;
 $self-{ record_length }  ||= 10;
 
 $self-{ fh } = IO::File-new(  $self-{ file } )
   or die(open $self-{ file }: $!);
 
 foreach ( 1 .. $self-{ file_count } ) {
   push(
 @{ $filehandles },
 IO::File-new( $self-{ output_prefix }.$_)
   );
 }
 $self-{ ofh } = $filehandles;
 
  }
 
  sub split {
 my($self) = shift(); my($buffer);
 my($counter) = 0;
 while ( sysread $self-{ fh }, $buffer, $self-{ record_length } ) {
   $self-{ ofh }[ $counter % $self-{ file_count } ]-print(
$buffer );
   $counter++;
 }
  }
 


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Splitting A large data file

2002-10-23 Thread Todd W


Tanton Gibbs wrote:

Also, there is a CPAN utility for doing this



Yeah, I forgot to mention again that Im just playing around. Always do a 
a search at http://search.cpan.org/ before you design your own solution 
because chances are that someone has already solved your problem. Other 
than for academic reasons, its (almost) always better to use a solution 
from CPAN, because chances are the module on CPAN is better debugged and 
documented.




Javeed Sar wrote:



How to combine it back after split???



perl -e 'print ' splitfile.1 splitfile.2 splitfile.3 splitfile.4
splitfile.5  splitfile.new.txt



snip /

Todd W.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Internet Explorer Session Count *Windows 98*

2002-10-23 Thread Beau E. Cox
Hi -

I couldn't find an easy way either, but...

I cranked out a simple c program that does
a EnumWindows call, and prints the result to the
console - it should work for you.

I put it on my ftp site:

ftp://beaucox.com

It's in the directory /pub/findwin -
look at the readme.txt and source for
very sketchy documentation.

If you have trouble accessing my site (I've
had some problems with it recently), email me
off-list and I will email you a copy.

Aloha = Beau.

-Original Message-
From: Voodoo Raja [mailto:voodooraja;hotmail.com]
Sent: Wednesday, October 23, 2002 5:23 PM
To: [EMAIL PROTECTED]
Subject: Internet Explorer Session Count *Windows 98*


I am doing a POS for a Internet cafe' with 60 workstations .
I would like to sync the POS to check for active IExplorer windows over the
LAN through the MFC or the registry... I em pretty sure that it does store a
session count in the registry.. but could not get to the right key after 2
week of hard surfing.

Hope one has got the right piece of code I am looking for.. any bit can be a
helpful bit.

Seeking all ur help
Voodoo Man!

http://www.voodoofiji.web1000.com Life will never be the same!

_
Broadband? Dial-up? Get reliable MSN Internet Access.
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: daft regex question

2002-10-23 Thread John W. Krahn
Dan wrote:
 
 ok, here's another weird question. i have, in a string, the value (or
 nickname) ][v][orpheus. This gets set to $pnick as such:
 
 $pnick = lc(substr($sockstr[0],1));
 
 which then makes $pnick = ][v][orpheus. lower down the procedure, i have
 an event,
 
 $chandat{$pchan}-{nicks} =~ s/\b$pnick//;
 $chandat{$pchan}-{nicks} =~ s/  / /;
 
 which removes the value of $pnick from the hash $chandat{$pchan}-{nicks}.
 now, if the value $pnick has any [ ] { } \ / or |, perl returns an error,
 and the program shuts down. i tried to fix this problem with this:
 
 $pnick =~ s/\|/\\\|/g;
 $pnick =~ s/\[/\\\[/g;
 $pnick =~ s/\]/\\\]/g;
 $pnick =~ s/\\//g;
 $pnick =~ s/\}/\\\}/g;
 $pnick =~ s/\{/\\\{/g;
 
 but running all that, returns this error:
 
  /\b\\]\\[v\\]\\[orpheus/: unmatched [] in regexp at newservice.pl line 292,
 SOCK line 118.
 
 i can't figure out a way (or regex method) i would use to replace [ with
 \[, ] with \], etc.. any clues?


You need quotemeta.  Either:

$pnick = quotemeta lc substr $sockstr[0], 1;

$chandat{$pchan}-{nicks} =~ s/\b$pnick//;


Or:

$pnick = lc substr $sockstr[0], 1;

$chandat{$pchan}-{nicks} =~ s/\b\Q$pnick//;



John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




MORE Tidying up repeated data

2002-10-23 Thread jonathan . musto
Hi again all,

Thanks for the help before it worked a treat.  What i'm looking to do now
with this file:

ght-Skem
ght-Skem
ght-Skem
hjy-TOB
hjy-TOB
hjy-TOB
etcetc

Aswell as removing the repeated data, i could also do with some type of
count next to the device that shows how many times it was repeated. Like:

ght-Skem 3
hjy-TOB 3
etc...etc...

Does anyone know of a way this could be done?

Cheers!

Jonathan Musto

 

BT Ignite Solutions
Telephone - 0113 237 3277
Fax - 0113 244 1413
E-mail - [EMAIL PROTECTED] mailto:Jonathan.Musto;bt.com 
http://www.technet.bt.com/sit/public


British Telecommunications plc 
Registered office: 81 Newgate Street London EC1A 7AJ 
Registered in England no. 180 
This electronic message contains information from British Telecommunications
plc which may be privileged or  confidential. The information is intended to
be for the use of the individual(s) or entity named above. If you  are not
the intended recipient be aware that any disclosure, copying, distribution
or use of the contents of  this information is prohibited. If you have
received this electronic message in error, please notify us by  telephone or
email (to the numbers or address above) immediately.






-Original Message-
From: [EMAIL PROTECTED] 
Sent: Monday, October 21, 2002 16:09
To: [EMAIL PROTECTED]
Subject: Tidying up repeated data


Hi all,
 
If i have a text file with a list of values i.e.
 
ght-Skem
ght-Skem
ght-Skem
hjy-TOB
hjy-TOB
hjy-TOB
etcetc
 
does anyone know of a regular expression to get rid off all the repeated
data, so that i just have a list as follows
 
ght-Skem
hjy-TOB
 
Any help would be much aprreciated!
 
cheers
 
Jonathan Musto

 

BT Ignite Solutions
Telephone - 0113 237 3277
Fax - 0113 244 1413
E-mail -  mailto:Jonathan.Musto;bt.com [EMAIL PROTECTED]
http://www.technet.bt.com/sit/public http://www.technet.bt.com/sit/public 


British Telecommunications plc 
Registered office: 81 Newgate Street London EC1A 7AJ 
Registered in England no. 180 
This electronic message contains information from British Telecommunications
plc which may be privileged or  confidential. The information is intended to
be for the use of the individual(s) or entity named above. If you  are not
the intended recipient be aware that any disclosure, copying, distribution
or use of the contents of  this information is prohibited. If you have
received this electronic message in error, please notify us by  telephone or
email (to the numbers or address above) immediately.




 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: eyes

2002-10-23 Thread Jenda Krynicky
 Not really perl related but maybe someone did the research..
 Programmers spend lots of hours in front of those text editors. What
 colors (background and font) are the best for the eyes (vision)?
 
 thanks,
 Mariusz

I'm sure you can find some medical papers on this on the Net. 
http://www.google.com/search?hl=enie=UTF-8oe=UTF-
8q=ergonomy+computerbtnG=Google+Search

Just one point ... black on white requires bigger frequency than 
white on black. A frequency that would be good enough for WoB would 
visibly flicker in BoW. And I guess there was a reason why some 
terminals were not black-and-white but black-and-green.

Jenda
P.S.: I used to have my Win 3.x set to black background and green 
letters. It looked nice, but some applications ignored the system 
settings and appeared in black-on-white :-(
I was too lazy to play with this later.
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: good text editor

2002-10-23 Thread shawn_milochik

Textpad (www.textpad.com) is great.  It's not free, but it does have syntax
highlighting and you can modify/create your own syntax rules.  Multiple
documents open at once, great find/replace and find in files features.

If anyone knows of a free text editor with customizable syntax
highlighting, I'd like to know about it.

Shawn




   

  mkubis22@hotmail 

  .com To:  [EMAIL PROTECTED] 

   cc: 

  10/22/2002 07:58 bcc:

  PM   Subject: good text editor   

   

   





Can someone recommend a good text editor for perl cgi scripting? I've been
using notepad, but was wondering if there is something a little better but
still simple like notepad. I wanted to change the background color (I heard
green is friendlier to the eyes) and be able to see the line numbers.

Thanks,
Mariusz

ps. Nice if it doesn't use too much resources.







**
This e-mail and any files transmitted with it may contain 
confidential information and is intended solely for use by 
the individual to whom it is addressed.  If you received
this e-mail in error, please notify the sender, do not 
disclose its contents to others and delete it from your 
system.

**


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: How to run -- some notes

2002-10-23 Thread shawn_milochik

I have Active Perl installed on Windows 2000, and to run the script, I only
need to type script.pl.  perl script.pl works also, but isn't
necessary.  On a Windows NT machine I have found that, when using the 'at'
command to schedule a script, I can't use perl script.pl or it fails --
script.pl works, though.

Shawn




   

  [EMAIL PROTECTED] 

   To:  [EMAIL PROTECTED], 
[EMAIL PROTECTED] 
  10/23/2002 05:38 cc: 

  AM   bcc:

  Please respond   Subject: RE: How to run 

  to beau  

   

   





Hi -

1) get ActiveState perl at http://www.activestate.com/Products/ActivePerl/
click the download button at the upper left, follow the
instructions, use the defaults - easy, fast, simple.

2) normally use the extension .pl for perl scripts.

3) to run your script, open a command prompt and type

perl myscript.pl [arguments...]

ActiveState also has a mailing list for win32/ActivePerl
users.

Welcome to the wonderful world of Perl!

Aloha = Beau.

-Original Message-
From: Sent To [mailto:sento;mail.com]
Sent: Tuesday, October 22, 2002 3:08 PM
To: [EMAIL PROTECTED]
Subject: How to run


Hi

How can I run perl scrip on windows?
Is ther any software I need to install and what file extension should i
use?
Thanks

regards
sentor
--
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








**
This e-mail and any files transmitted with it may contain 
confidential information and is intended solely for use by 
the individual to whom it is addressed.  If you received
this e-mail in error, please notify the sender, do not 
disclose its contents to others and delete it from your 
system.

**


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: good text editor

2002-10-23 Thread Nikola Janceski
nedit is good, www.nedit.org, but you need some third party stuff to make it
run on windows, there is lots on the website to explain how to install/run
on windows.

 -Original Message-
 From: Mariusz [mailto:mkubis22;hotmail.com]
 Sent: Tuesday, October 22, 2002 7:58 PM
 To: perl
 Subject: good text editor
 
 
 Can someone recommend a good text editor for perl cgi 
 scripting? I've been using notepad, but was wondering if 
 there is something a little better but still simple like 
 notepad. I wanted to change the background color (I heard 
 green is friendlier to the eyes) and be able to see the line numbers.
 
 Thanks,
 Mariusz
 
 ps. Nice if it doesn't use too much resources.
 



The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: How to run -- some notes

2002-10-23 Thread Beau E. Cox
Yea Shawn -

ActivePerl sets the windows file association to perl for
..pl files.

I don't know the at problem...

I stick to the perl script.pl format because I remember
having problems passing arguments to the script w/the
short form...never got around to finding out why.

Aloha = Beau.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:shawn_milochik;godivachoc.com]
Sent: Wednesday, October 23, 2002 2:56 AM
To: [EMAIL PROTECTED]
Subject: RE: How to run -- some notes



I have Active Perl installed on Windows 2000, and to run the script, I only
need to type script.pl.  perl script.pl works also, but isn't
necessary.  On a Windows NT machine I have found that, when using the 'at'
command to schedule a script, I can't use perl script.pl or it fails --
script.pl works, though.

Shawn





  [EMAIL PROTECTED]
   To:  [EMAIL PROTECTED],
[EMAIL PROTECTED]
  10/23/2002 05:38 cc:
  AM   bcc:
  Please respond   Subject: RE: How to run
  to beau






Hi -

1) get ActiveState perl at http://www.activestate.com/Products/ActivePerl/
click the download button at the upper left, follow the
instructions, use the defaults - easy, fast, simple.

2) normally use the extension .pl for perl scripts.

3) to run your script, open a command prompt and type

perl myscript.pl [arguments...]

ActiveState also has a mailing list for win32/ActivePerl
users.

Welcome to the wonderful world of Perl!

Aloha = Beau.

-Original Message-
From: Sent To [mailto:sento;mail.com]
Sent: Tuesday, October 22, 2002 3:08 PM
To: [EMAIL PROTECTED]
Subject: How to run


Hi

How can I run perl scrip on windows?
Is ther any software I need to install and what file extension should i
use?
Thanks

regards
sentor
--
__
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








**
This e-mail and any files transmitted with it may contain
confidential information and is intended solely for use by
the individual to whom it is addressed.  If you received
this e-mail in error, please notify the sender, do not
disclose its contents to others and delete it from your
system.

**


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to run -- some notes

2002-10-23 Thread Dave K
Hope this is helpful...
Setting file associations is done by ActivePerl but if you want to use
command line parameters:
go to
My Computer,
  View,
Options,
   File Types
 Edit the file type with the .pl extension,
Edit the 'Open' action
Include %1 %* so that the last portion of the line looks like
\perl.exe %1 %*
This will give you access to command line parameters

Beau E. Cox [EMAIL PROTECTED] wrote in message
news:HJENIAHJOBAICFNFJEAIKEMDCAAA.beau;beaucox.com...
 Yea Shawn -

 ActivePerl sets the windows file association to perl for
 ..pl files.

 I don't know the at problem...

 I stick to the perl script.pl format because I remember
 having problems passing arguments to the script w/the
 short form...never got around to finding out why.

 Aloha = Beau.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:shawn_milochik;godivachoc.com]
 Sent: Wednesday, October 23, 2002 2:56 AM
 To: [EMAIL PROTECTED]
 Subject: RE: How to run -- some notes



 I have Active Perl installed on Windows 2000, and to run the script, I
only
 need to type script.pl.  perl script.pl works also, but isn't
 necessary.  On a Windows NT machine I have found that, when using the 'at'
 command to schedule a script, I can't use perl script.pl or it fails --
 script.pl works, though.

 Shawn





   [EMAIL PROTECTED]
To:  [EMAIL PROTECTED],
 [EMAIL PROTECTED]
   10/23/2002 05:38 cc:
   AM   bcc:
   Please respond   Subject: RE: How to run
   to beau






 Hi -

 1) get ActiveState perl at http://www.activestate.com/Products/ActivePerl/
 click the download button at the upper left, follow the
 instructions, use the defaults - easy, fast, simple.

 2) normally use the extension .pl for perl scripts.

 3) to run your script, open a command prompt and type

 perl myscript.pl [arguments...]

 ActiveState also has a mailing list for win32/ActivePerl
 users.

 Welcome to the wonderful world of Perl!

 Aloha = Beau.

 -Original Message-
 From: Sent To [mailto:sento;mail.com]
 Sent: Tuesday, October 22, 2002 3:08 PM
 To: [EMAIL PROTECTED]
 Subject: How to run


 Hi

 How can I run perl scrip on windows?
 Is ther any software I need to install and what file extension should i
 use?
 Thanks

 regards
 sentor
 --
 __
 Sign-up for your own FREE Personalized E-mail at Mail.com
 http://www.mail.com/?sr=signup


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]








 **
 This e-mail and any files transmitted with it may contain
 confidential information and is intended solely for use by
 the individual to whom it is addressed.  If you received
 this e-mail in error, please notify the sender, do not
 disclose its contents to others and delete it from your
 system.

 **


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Using CPAN.pm to Install Modules

2002-10-23 Thread eric-perl
Hello, All:

I'm confounded by CPAN.pm's documentation. I've already configured the 
module but can't figure out how to 'install' a module. e.g., MIME::Lite.

Starting with...

% perl -MCPAN -e shell
cpan i MIME/Lite

tells me that there's a distribution called MIME/Lite BUT...

cpan install MIME/Lite

tells me that the author MIME/Lite could not be found.

How can I install this module/distribution?

-- 
Eric P.
Sunnyvale, CA


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: good text editor

2002-10-23 Thread loan tran
EditPlus is good.

--- Nikola Janceski [EMAIL PROTECTED]
wrote:
 nedit is good, www.nedit.org, but you need some
 third party stuff to make it
 run on windows, there is lots on the website to
 explain how to install/run
 on windows.
 
  -Original Message-
  From: Mariusz [mailto:mkubis22;hotmail.com]
  Sent: Tuesday, October 22, 2002 7:58 PM
  To: perl
  Subject: good text editor
  
  
  Can someone recommend a good text editor for perl
 cgi 
  scripting? I've been using notepad, but was
 wondering if 
  there is something a little better but still
 simple like 
  notepad. I wanted to change the background color
 (I heard 
  green is friendlier to the eyes) and be able to
 see the line numbers.
  
  Thanks,
  Mariusz
  
  ps. Nice if it doesn't use too much resources.
  
 


 
 The views and opinions expressed in this email
 message are the sender's
 own, and do not necessarily represent the views and
 opinions of Summit
 Systems Inc.
 
 
 -- 
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]
 


__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: eyes

2002-10-23 Thread Michael Hooten
Yellow on black is supposedly the most visible color combination to the
human eye. You can give it a try.

-Original Message-
From: Mariusz [mailto:mkubis22;hotmail.com]
Sent: Tuesday, October 22, 2002 11:48 PM
To: perl
Subject: eyes


Not really perl related but maybe someone did the research..
Programmers spend lots of hours in front of those text editors. What colors
(background and font) are the best for the eyes (vision)?

thanks,
Mariusz



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Wants to know about outlook with perl

2002-10-23 Thread Michael Hooten
You can do this from Perl if you wish. What follows is VBA code that does
almost everything you want. You will have to convert it to Win32 Perl. (Hey,
I can't do everything for you.)

What is excluded is info regarding the username and password. This info is
definitely in the Outlook VBA help file. See how to do it in Outlook VBA
then simply convert the code to Win32 Perl. I have done the same thing with
Access VBA and it is fairly simple. Please refer to the link Using OLE with
Perl in the ActivePerl help file. There are many examples.

---BEGIN OFFENSIVE M$ CODE HERE-
Sub SendFile()
Dim ol As Outlook.Application
Dim olMail As Outlook.MailItem

Set ol = New Outlook.Application
Set olMail = ol.CreateItem(olMailItem)

With olMail
.Recipients.Add [EMAIL PROTECTED]
.Subject = My subject goes here.
.Body = This is a test.
.Attachments.Add E:\Documents\attachment.doc, olByValue
.Send
End With

Set ol = Nothing
Set olMail = Nothing
End Sub
END OFFENSIVE M$ CODE HERE--

-Original Message-
From: Hello Buddy [mailto:hello_buddy_001;yahoo.com]
Sent: Tuesday, October 22, 2002 9:44 PM
To: [EMAIL PROTECTED]
Subject: Wants to know about outlook with perl


Hi,
 I am totally beginner in Perl and programming. I
have no experience before. I want to know that is it
possible to do with perl script to write and send the
mail for outlook without opening outlook
application?.
 What I mean is I just enter user name and
password for outlook account and give the text file of
message to perl and I want perl to do it
automatically. Thanks in advance for your answers.

Best regards
Aung

__
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: good text editor

2002-10-23 Thread Beau E. Cox
Mariusz -

Looks like a good perl/tk project :-)

Aloha = Beau.

-Original Message-
From: loan tran [mailto:loan_tr;yahoo.com]
Sent: Wednesday, October 23, 2002 4:07 AM
To: [EMAIL PROTECTED]
Subject: RE: good text editor


EditPlus is good.

--- Nikola Janceski [EMAIL PROTECTED]
wrote:
 nedit is good, www.nedit.org, but you need some
 third party stuff to make it
 run on windows, there is lots on the website to
 explain how to install/run
 on windows.

  -Original Message-
  From: Mariusz [mailto:mkubis22;hotmail.com]
  Sent: Tuesday, October 22, 2002 7:58 PM
  To: perl
  Subject: good text editor
 
 
  Can someone recommend a good text editor for perl
 cgi
  scripting? I've been using notepad, but was
 wondering if
  there is something a little better but still
 simple like
  notepad. I wanted to change the background color
 (I heard
  green is friendlier to the eyes) and be able to
 see the line numbers.
 
  Thanks,
  Mariusz
 
  ps. Nice if it doesn't use too much resources.
 



 
 The views and opinions expressed in this email
 message are the sender's
 own, and do not necessarily represent the views and
 opinions of Summit
 Systems Inc.


 --
 To unsubscribe, e-mail:
 [EMAIL PROTECTED]
 For additional commands, e-mail:
 [EMAIL PROTECTED]



__
Do you Yahoo!?
New DSL Internet Access from SBC  Yahoo!
http://sbc.yahoo.com

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




PERL vs. PHP?

2002-10-23 Thread [EMAIL PROTECTED]
Hi!  I'm just learning PERL, and I love it so far!  A friend of mine wants help with a 
project that involves moving data to and from a MySQL database via the web, but he 
wants to find someone who can do it using PHP.  He said that he heard that PHP is 
faster and more powerful.  Is this true?  Are there other advantages to PHP over PERL? 
 Are there advantages to PERL over PHP?

Thanks!

Josh


RE: eyes

2002-10-23 Thread Beau E. Cox
My favorite is black (at lease 12 pt) on off-white
(rgb (248,248,238)) - been using it for years - and
I'm really old!

Aloha = Beau.

-Original Message-
From: Michael Hooten [mailto:michael.hooten;verizon.net]
Sent: Wednesday, October 23, 2002 3:23 AM
To: Mariusz; perl
Subject: RE: eyes


Yellow on black is supposedly the most visible color combination to the
human eye. You can give it a try.

-Original Message-
From: Mariusz [mailto:mkubis22;hotmail.com]
Sent: Tuesday, October 22, 2002 11:48 PM
To: perl
Subject: eyes


Not really perl related but maybe someone did the research..
Programmers spend lots of hours in front of those text editors. What colors
(background and font) are the best for the eyes (vision)?

thanks,
Mariusz



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Using CPAN.pm to Install Modules

2002-10-23 Thread Jenda Krynicky
From:   [EMAIL PROTECTED]
 I'm confounded by CPAN.pm's documentation. I've already configured the
 module but can't figure out how to 'install' a module. e.g.,
 MIME::Lite.
 
 Starting with...
 
 % perl -MCPAN -e shell
 cpan i MIME/Lite
 
 tells me that there's a distribution called MIME/Lite BUT...
 
 cpan install MIME/Lite
 
 tells me that the author MIME/Lite could not be found.

Try
cpan install MIME::Lite

Jenda
= [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: PERL vs. PHP?

2002-10-23 Thread [EMAIL PROTECTED]
OK.  My apologies.  Perhaps a better way to phrase my question would be:
What are the differences between PERL and PHP?  What are PERL's strong
points over PHP?  I would much rather convince this guy that PERL is just as
good or better than have to learn another language!

Thanks,
Josh


- Original Message -
From: David U. [EMAIL PROTECTED]
To: [EMAIL PROTECTED] [EMAIL PROTECTED]
Sent: Wednesday, October 23, 2002 9:28 AM
Subject: Re: PERL vs. PHP?


 [EMAIL PROTECTED] wrote:
  Hi!  I'm just learning PERL, and I love it so far!  A friend of mine
  wants help with a project that involves moving data to and from a
  MySQL database via the web, but he wants to find someone who can do
  it using PHP.  He said that he heard that PHP is faster and more
  powerful.  Is this true?  Are there other advantages to PHP over
  PERL?  Are there advantages to PERL over PHP?

 Yes, PHP is better.

 We all use Perl because we enjoy using inferrior and slower tools.

 This is dumbest question I've ever seen posted, by the way.

 It's like asking a Ford-fan club if they like Chevy better.

 -davidu





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: PERL vs. PHP?

2002-10-23 Thread Beau E. Cox
Oh boy -

You shouldn't ask a question like that to a bunch of
perl mongers! :)

Maybe more powerful, maybe not.
yes and yes.

I have coded web pages in php for many years before
I got into perl - I like perl better for
one simple reason:

I can get more done in a given amount of time with perl
than I can with php.

This is not to say it is for everyone, but when I am able
to choose my environment, I almost always go for perl
unless there are overriding reasons not to.

Good luck.

Aloha = Beau.

-Original Message-
From: [EMAIL PROTECTED] [mailto:perl;vidriot.com]
Sent: Wednesday, October 23, 2002 4:00 AM
To: [EMAIL PROTECTED]
Subject: PERL vs. PHP?


Hi!  I'm just learning PERL, and I love it so far!  A friend of mine wants
help with a project that involves moving data to and from a MySQL database
via the web, but he wants to find someone who can do it using PHP.  He said
that he heard that PHP is faster and more powerful.  Is this true?  Are
there other advantages to PHP over PERL?  Are there advantages to PERL over
PHP?

Thanks!

Josh



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: PERL vs. PHP?

2002-10-23 Thread George Schlossnagle

While it may be faster under some circumstances I would not say it's
more powerfull. The number of modules for Perl is definitely much
bigger than for PHP. Plus PHP is only supposed to be used from Web,
while Perl is a general purpose language. Actually I do not remember
when was the last time I did use it for web.


Actually alot of effort has been applied recently to making PHP a 
general purpose scripting language.  It now installs a cli 
out-of-the-box (that doesn't stick HTTP response headers at the top of 
every output) and the php-gtk stuff is making alot of progress.

I'd weigh in on Perl being more powerful, having a larger library set, 
and having much cleaner namespace semantics.  But PHP is a much less 
mature language than Perl, and it is coming into it's own.


// George Schlossnagle
// Principal Consultant
// OmniTI, Inc  http://www.omniti.com
// (c) 240.460.5234   (e) [EMAIL PROTECTED]
// 1024D/1100A5A0  1370 F70A 9365 96C9 2F5E 56C2 B2B9 262F 1100 A5A0


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: PERL vs. PHP?

2002-10-23 Thread [EMAIL PROTECTED]
Beau and Jenda,

Thank you so much for your kind responses.  This clears up alot for me (and
makes me feel a bit better about being a part of this list!)

Thanks,
Josh



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: eyes

2002-10-23 Thread zentara
On Tue, 22 Oct 2002 22:47:45 -0500, [EMAIL PROTECTED] (Mariusz)
wrote:

Not really perl related but maybe someone did the research..
Programmers spend lots of hours in front of those text editors. What colors 
(background and font) are the best for the eyes (vision)?

I don't know about the colors, but bright white will be hard on your
eyes. Lower the settings on your monitor for brightness, and color
temperature. Also put a 40 watt light behind your monitor to backlight
it, if you are in a dim room.
The bright rasters make graphics look great, but staring at text files
all day on them, will be hard on the eyes. Try to soften your screen,
so instead of brilliant white you have a washed grey look.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Want to know about outlook

2002-10-23 Thread Stephen Mayes
As others have pointed out outlook is purely a client connecting to, usually
exchange. For the purposes of firing off an email the only M$ option is an
exe called mapisend.exe which is a command line smtp mailer - it is part of
the back office resource kit. 

However that is charged for, personally I would use BLAT a decent, free
command line mailer and the following page is about how to use it with perl.

http://www.rrpro.com/support/webform_blat.asp
http://www.rrpro.com/support/webform_blat.asp  

Also whilst exchange can support LDAP, POP3, MIME etc. It will certainly
support SMTP, but one thing to watch out for is whether the server will
accept smtp connections from any IP address. Any security conscious mail
admin will lock down IP connection addresses (we do).

Hope this helps

Steve


**
This email and any attached files are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager ([EMAIL PROTECTED]).

Any misuse, transmission to unauthorised third parties or 
misrepresentation of any of the data contained in this email may
may lead to MSV Ltd seeking legal redress.

This note also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.marshallsv.com
**

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




learning...

2002-10-23 Thread Jean-Marie de Crozals
Hi...

I'm really new on perl and wanna know if there is a good website with 
some tutoials and explanations about perl...

I just wanna have flexible rename for many files in my shell...(;

i'm using macosx10.2.1

thanks...

-- 
Jean-Marie de Crozals

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: learning...

2002-10-23 Thread Pravesh Biyani
http://www.cs.cf.ac.uk/Dave/PERL/
check this out!

for more webpages.. go to google.com

cheers

prävesh

- Original Message -
From: Jean-Marie de Crozals [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 23, 2002 4:59 PM
Subject: learning...


 Hi...

 I'm really new on perl and wanna know if there is a good website with
 some tutoials and explanations about perl...

 I just wanna have flexible rename for many files in my shell...(;

 i'm using macosx10.2.1

 thanks...

 --
 Jean-Marie de Crozals

 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: learning...

2002-10-23 Thread Beau E. Cox
Good morning (afternoon?) Jean-Marie,

A lot of us started with www.learn.perl.org .

Once you start baby-perl (not an insult, we all went
thru this stage), this list is an excellent resource.

Of course, Programming Perl, 3rd edition, by Wall, et.al.,
O'Reily (2000) is THE perl book to have (IMHO).

Aloha = Beau.

-Original Message-
From: Jean-Marie de Crozals [mailto:mail;jeanmariedc.de]
Sent: Wednesday, October 23, 2002 4:59 AM
To: [EMAIL PROTECTED]
Subject: learning...


Hi...

I'm really new on perl and wanna know if there is a good website with 
some tutoials and explanations about perl...

I just wanna have flexible rename for many files in my shell...(;

i'm using macosx10.2.1

thanks...

-- 
Jean-Marie de Crozals

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: learning...

2002-10-23 Thread Geoffrey F. Green
On 10/23/02 11:17 AM, Beau E. Cox [EMAIL PROTECTED] wrote:

 Good morning (afternoon?) Jean-Marie,
 
 A lot of us started with www.learn.perl.org .
 
 Once you start baby-perl (not an insult, we all went
 thru this stage), this list is an excellent resource.
 
 Of course, Programming Perl, 3rd edition, by Wall, et.al.,
 O'Reily (2000) is THE perl book to have (IMHO).

And don't forget Learning Perl,  http://www.oreilly.com/catalog/lperl3/,
which made me into the Perl coder I am today.  (Actually, that's not much of
a compliment, but that's my fault, not the book's!)

 - geoff 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Perl vs. PHP?

2002-10-23 Thread Martin Hudec
Hi all,

well I use Perl and sometimes PHPdifferences for me are these...

PHP is good for small web projects such as small e-commerce,
guestbooks etc. applications.

Perl is excellent for big web projects such as portals, mainly because
it is more integrated into system than PHP, also you can use more
system functions...etc. Oh, and i use Perl often in Linux
administration to write scriptscurrently we are developing
standalone Windows application with GUI in Perl :

-- 
Best regards,
 Martin  mailto:corwin;corwin.sk


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Long Time Script Suddenly Failing

2002-10-23 Thread Peter Scott
In article [EMAIL PROTECTED],
 I wrote:
I predict that if you insert

   BEGIN { $|=1; print Content-type: text/plain\n\n }

after the #! line of that script, you will see something illuminating when
you next visit it through a browser.

Boy, do I have egg on my face.  I didn't pay attention to the question
and just saw the 500 server error message - thought it was a CGI program,
didn't see that it was browser masquerading.  My apologies to Guy.

I took the script, ripped out the database part, and ended up with what's
below.  It doesn't have the problem described; it fetches a page just fine.
All I can think is that since you set a 15-second timeout that you were
having network problems that day that made it a bit slow to connect to that
site.  Try this again, and if you get the same problem, try accessing the
URL that your program wants to fetch from a browser or with the GET program
that comes with LWP.

The only problem I found was that the script makes a new URI::URL object
and yet there is no use URI::URL.  So I don't understand how it compiled;
it should have said

 Can't locate object method new via package URI::URL
 (perhaps you forgot to load URI::URL?) 

#!/usr/bin/perl -w
use strict;

use LWP::UserAgent;
use URI::URL;
my $VERBOSE=1;

@MyAgent::ISA = qw(LWP::UserAgent);
sub MyAgent::redirect_ok {
  my ($self,$request)=@_;
  if ($request-method eq POST) {
$request-method(GET);
  }
  return 1;
}

gettraffic(foo);

sub gettraffic {
my ($keyword) = @_;
my $traffic=0;

my $url =
http://inventory.overture.com/d/searchinventory/suggestion/?term=; . $keyword;
my $ua  = new MyAgent;
my $agent   = 'Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)';

## Set some User Agent properties.
$ua-agent($agent);
$ua-timeout(15);

## Convert the URL into a url object (with a couple methods we can use).
my $u =  new URI::URL( $url );

## Fetch the web page.
my $req = HTTP::Request-new(GET=$u-as_string);
my $res = $ua-request($req);
my $resstring = $res-as_string;

print URL: $url\n if ($VERBOSE);
print $resstring\n if ($VERBOSE);

# Check the outcome of the response
if ($res-is_success) {
my $content = $res-content;
$content =~ m/.*nbsp;([0-9]+)\/b.*/s;
my $traffic = $1;
if (!$traffic) {
$traffic = 0;
}

} 
}


-- 
Peter Scott
http://www.perldebugged.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: using 'map' with mixture of scalars and array refs...

2002-10-23 Thread Peter Scott
In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Michael Hooten) writes:
Simpler and easier to read:
@combined = map { ref $_ eq 'ARRAY' ? @$_ : $_ } values %{$hash{family}};

Either dereference the array or return the scalar.

Yes, I'm aware of the 'either' in the posting.  However, the example cited showed
both an array and a scalar being assigned to the key 'family'.  My code played it
safe and didn't assume they were mutually exclusive.

Also, your example only generates the list for one fixed key, instead
of going through the whole hash.

In article [EMAIL PROTECTED],
 [EMAIL PROTECTED] (Michael Kavanagh) writes:
Hi there,

I've got a hash that has keys which contain either
- array references
- scalar values

for example:
@values = (12398712984, 19286192879);
$hashofarrays{'family'}{'arrayref'} = \@values;
$hashofarrays{'family'}{'scalar'} = 12938712938;

@combined = map { @{$_-{arrayref}||[]}, exists $_-{scalar} ? $_-{scalar}
: ()  }
 values %hashofarrays;


-- 
Peter Scott
http://www.perldebugged.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Perl vs. PHP?

2002-10-23 Thread Matthew C. Peterson
My take:

PHP -
many glorious built-in functions
easily embedded into HTML
simple to learn, easy to read
simpler documentation
very fast
practically made for database driven sites
more lengthy than perl
weaker system commands
at home on any system


Perl -
many glorious modules
difficult to learn, but totally worth it
slightly complex documentation
more powerful than PHP
faster than PHP
not as quick for web development, but a bit more robust
more at home in *nix environment (could be wrong here...)

My background - PHP Web application developer - 3yrs
OOP-OOD - 2yrs
Perl Person - 2 yrs

On the  whole, I use PHP for database driven web pages, and Perl for system
tasks, back-end applications, backups, etc...(everything else).

Matt

- Original Message -
From: Martin Hudec [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, October 23, 2002 9:39 AM
Subject: Re: Perl vs. PHP?


 Hi all,

 well I use Perl and sometimes PHPdifferences for me are these...

 PHP is good for small web projects such as small e-commerce,
 guestbooks etc. applications.

 Perl is excellent for big web projects such as portals, mainly because
 it is more integrated into system than PHP, also you can use more
 system functions...etc. Oh, and i use Perl often in Linux
 administration to write scriptscurrently we are developing
 standalone Windows application with GUI in Perl :

 --
 Best regards,
  Martin  mailto:corwin;corwin.sk


 --
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Long Time Script Suddenly Failing

2002-10-23 Thread Guy Davis
Peter,

I'm really pulling my hair out now. I had tried different timeouts (even the default 
of 3 minutes) and still it's not working. Even using your simplified version of the 
script as a test I'm still getting that error so there must be something going on on 
the Linux box I'm using.

I had thought that for some reason our box was no longer recognizing the 
http://inventory page and used the ip address instead. I'm no perl or unix expert and 
am really frustrated but at least it would appear that the problem is definitely on my 
end.

Guy

-Original Message-
From: Peter Scott [mailto:peter;psdt.com]
Sent: Wednesday, October 23, 2002 11:42 AM
To: [EMAIL PROTECTED]
Subject: Re: Long Time Script Suddenly Failing


In article [EMAIL PROTECTED],
 I wrote:
I predict that if you insert

   BEGIN { $|=1; print Content-type: text/plain\n\n }

after the #! line of that script, you will see something illuminating when
you next visit it through a browser.

Boy, do I have egg on my face.  I didn't pay attention to the question
and just saw the 500 server error message - thought it was a CGI program,
didn't see that it was browser masquerading.  My apologies to Guy.

I took the script, ripped out the database part, and ended up with what's
below.  It doesn't have the problem described; it fetches a page just fine.
All I can think is that since you set a 15-second timeout that you were
having network problems that day that made it a bit slow to connect to that
site.  Try this again, and if you get the same problem, try accessing the
URL that your program wants to fetch from a browser or with the GET program
that comes with LWP.

The only problem I found was that the script makes a new URI::URL object
and yet there is no use URI::URL.  So I don't understand how it compiled;
it should have said

 Can't locate object method new via package URI::URL
 (perhaps you forgot to load URI::URL?) 

#!/usr/bin/perl -w
use strict;

use LWP::UserAgent;
use URI::URL;
my $VERBOSE=1;

@MyAgent::ISA = qw(LWP::UserAgent);
sub MyAgent::redirect_ok {
  my ($self,$request)=@_;
  if ($request-method eq POST) {
$request-method(GET);
  }
  return 1;
}

gettraffic(foo);

sub gettraffic {
my ($keyword) = @_;
my $traffic=0;

my $url =
http://inventory.overture.com/d/searchinventory/suggestion/?term=; . $keyword;
my $ua  = new MyAgent;
my $agent   = 'Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)';

## Set some User Agent properties.
$ua-agent($agent);
$ua-timeout(15);

## Convert the URL into a url object (with a couple methods we can use).
my $u =  new URI::URL( $url );

## Fetch the web page.
my $req = HTTP::Request-new(GET=$u-as_string);
my $res = $ua-request($req);
my $resstring = $res-as_string;

print URL: $url\n if ($VERBOSE);
print $resstring\n if ($VERBOSE);

# Check the outcome of the response
if ($res-is_success) {
my $content = $res-content;
$content =~ m/.*nbsp;([0-9]+)\/b.*/s;
my $traffic = $1;
if (!$traffic) {
$traffic = 0;
}

} 
}


-- 
Peter Scott
http://www.perldebugged.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re[2]: Perl vs. PHP?

2002-10-23 Thread Martin Hudec
Hello Matthew,

so Perl is also good that you can implement many more languages such
as c++, also there are many modules at CPAN (swig) for this.

If you want to see our perl implementation look at www.markiza.sk
which was formerly running on PHP and his average load was around
10-20 with PHP, now it is about 0.5 to 0.7 average load.

Yes, PHP is good for database using sites (it is easier and faster to
write such site in PHP than in perl).

Wednesday, October 23, 2002, 5:50:07 PM, you wrote:

MCP My take:

MCP PHP -
MCP many glorious built-in functions
MCP easily embedded into HTML
MCP simple to learn, easy to read
MCP simpler documentation
MCP very fast
MCP practically made for database driven sites
MCP more lengthy than perl
MCP weaker system commands
MCP at home on any system


MCP Perl -
MCP many glorious modules
MCP difficult to learn, but totally worth it
MCP slightly complex documentation
MCP more powerful than PHP
MCP faster than PHP
MCP not as quick for web development, but a bit more robust
MCP more at home in *nix environment (could be wrong here...)

MCP My background - PHP Web application developer - 3yrs
MCP OOP-OOD - 2yrs
MCP Perl Person - 2 yrs

MCP On the  whole, I use PHP for database driven web pages, and Perl for system
MCP tasks, back-end applications, backups, etc...(everything else).

MCP Matt

-- 
Best regards,
 Martinmailto:corwin;corwin.sk


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Re[2]: Perl vs. PHP?

2002-10-23 Thread George Schlossnagle
In all fairness, it's very easy to write C/C++ extensions for PHP as 
well.

George

On Wednesday, October 23, 2002, at 12:02 PM, Martin Hudec wrote:

Hello Matthew,

so Perl is also good that you can implement many more languages such
as c++, also there are many modules at CPAN (swig) for this.

If you want to see our perl implementation look at www.markiza.sk
which was formerly running on PHP and his average load was around
10-20 with PHP, now it is about 0.5 to 0.7 average load.

Yes, PHP is good for database using sites (it is easier and faster to
write such site in PHP than in perl).

Wednesday, October 23, 2002, 5:50:07 PM, you wrote:

MCP My take:

MCP PHP -
MCP many glorious built-in functions
MCP easily embedded into HTML
MCP simple to learn, easy to read
MCP simpler documentation
MCP very fast
MCP practically made for database driven sites
MCP more lengthy than perl
MCP weaker system commands
MCP at home on any system


MCP Perl -
MCP many glorious modules
MCP difficult to learn, but totally worth it
MCP slightly complex documentation
MCP more powerful than PHP
MCP faster than PHP
MCP not as quick for web development, but a bit more robust
MCP more at home in *nix environment (could be wrong here...)

MCP My background - PHP Web application developer - 3yrs
MCP OOP-OOD - 2yrs
MCP Perl Person - 2 yrs

MCP On the  whole, I use PHP for database driven web pages, and Perl 
for system
MCP tasks, back-end applications, backups, etc...(everything else).

MCP Matt

--
Best regards,
 Martinmailto:corwin;corwin.sk


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


// George Schlossnagle
// Principal Consultant
// OmniTI, Inc  http://www.omniti.com
// (c) 240.460.5234   (e) [EMAIL PROTECTED]
// 1024D/1100A5A0  1370 F70A 9365 96C9 2F5E 56C2 B2B9 262F 1100 A5A0


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Perl vs. PHP?

2002-10-23 Thread NYIMI Jose (BMB)
Totally aggree with you Nigel.
To complete, some of you may give a look to :
http://www.perl.com/pub/a/2001/06/05/cgi.html

Which uses a clear separation between the 3 layers mentioned by Nigel.

José.

 -Original Message-
 From: Nigel Wetters [mailto:nigel.wetters;rivalsdm.com] 
 Sent: Wednesday, October 23, 2002 6:19 PM
 To: [EMAIL PROTECTED]
 Subject: Re: Perl vs. PHP?
 
 
 PHP is a good templating language, similar to ASP, JSP, etc.
 
 The problem with templating languages is that they're too 
 good. It's always tempting for the programmer to introduce 
 yet another small piece of logic into a page.
 
 It extremely difficult with these templating languages to 
 abstract the various layers of a moderately complex application.
 
 Many applications can be split into three layers (model, 
 view, and controller). The model is the underlying structure 
 of your data, which won't differ whether you're accessing the 
 data through the web, the command line, or a GUI. The view is 
 a thin skin which presents the model on a particular platform 
 (HTML, text, Tk, etc.). The controller validates user input, 
 and decides what happens next. Templating languages are 
 excellent for building the view layer
 
 Using mod_perl and template toolkit, or servlets and JSP, or 
 COM and ASP, it's easy to write applications with clear 
 boundaries between layers. With only the templating language, 
 the model and controller are forced into the view layer, 
 which soon becomes unmaintainable.
 
 However, PHP is fine for building quick and dirty webpages, 
 which is what most people want.
 -- 
 Nigel Wetters, Senior Programmer, Development Group
 Rivals Digital Media Ltd, 151 Freston Road, London W10 6TH
 Tel. 020 8962 1346 (direct line), Fax. 020 8962 1311 
http://www.rivalsdm.com/ [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Perl vs. PHP?

2002-10-23 Thread NYIMI Jose (BMB)
Use PHP Smarty if you want to separate application logic and presentation logic.

See : http://smarty.php.net/manual/en/what.is.smarty.html

José.

 -Original Message-
 From: NYIMI Jose (BMB) 
 Sent: Wednesday, October 23, 2002 6:32 PM
 To: Nigel Wetters; [EMAIL PROTECTED]
 Subject: RE: Perl vs. PHP?
 
 
 Totally aggree with you Nigel.
 To complete, some of you may give a look to : 
 http://www.perl.com/pub/a/2001/06/05/cgi.html
 
 Which uses a clear separation between the 3 layers mentioned by Nigel.
 
 José.


 DISCLAIMER 

This e-mail and any attachment thereto may contain information which is confidential 
and/or protected by intellectual property rights and are intended for the sole use of 
the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, total or 
partial reproduction, communication or distribution in any form) by other persons than 
the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either by 
telephone or by e-mail and delete the material from any computer.

Thank you for your cooperation.

For further information about Proximus mobile phone services please see our website at 
http://www.proximus.be or refer to any Proximus agent.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Proc::Simple background processes error

2002-10-23 Thread Smith Jeff D
I am trying to use the Proc::Simple module in one of my
scripts--this is my first use of this module and I am a novice Perl scriptor
so bear with me.  I am using this function so that I can start a background
or detached process--ultimately an interactive detached process-- and still
return to the calling perl script and do other things without waiting for
the called process to end.  Using backticks and system calls alone don't
seem to do the trick.

I downloaded and successfully installed the module from CPAN and
followed the synopsis approach just to get comfortable with how it works.  I
am working on a WinNT v. 4 workstation running the Perl Resource Kit and
Perl v. 5..005.   I get the following error when trying to run a background
shell process (I just tried a simple process notepad to start with):

The Unsupported function fork function is unimplemented at
C:\Perl\site\5.005\lib/Proc/Simple.pm line 188.
Use of uninitialized value at C:\Perl\site\5.005\lib/Proc/Simple.pm line
391.
Use of uninitialized value at C:\Perl\site\5.005\lib/Proc/Simple.pm line
391.

There was nothing in the documentation that said it wouldn't run
under 5.005 but it recommends 5.6.0.  Since I'm running this old Resource
Kit, I want to be sure that I have to upgrade to Perl 5.6 (or 5.8) for this
module before I do all that.  

Does anyone have any experience with this module? am I missing some
other dependent module(s) that is causing fork to fail?  Thanks

Jeff Smith 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Looking for some Documentation

2002-10-23 Thread Chris Benco
Trying to get a script to read information from an old access 97 database.
Just looking for a place to start.  Is this going to be a DBI/ODBC issue?
or OLE?  Just looking for a point in the right direction.

Chris Benco
[EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: good text editor

2002-10-23 Thread Tim Musson
Hey shawn, 

My MUA believes you used Lotus Notes Release 5.0.8  June 18, 2001
to write the following on Wednesday, October 23, 2002 at 8:48:41 AM.

sgc If anyone knows of a free text editor with customizable syntax
sgc highlighting, I'd like to know about it.

I use both www.vim.org and www.TextPad.com and have syntax
highlighting in both.

-- 
[EMAIL PROTECTED]
Flying with The Bat! eMail v1.61
Windows 2000 5.0.2195 (Service Pack 2)
Why are you wasting time reading taglines?


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Looking for some Documentation

2002-10-23 Thread Hanson, Rob
 Is this going to be a DBI/ODBC issue?
 or OLE?

Either one.

There is also another way, OLE/ADO if you are familiar with ADO.  My
preference would be to stay away from the straight OLE approach unless you
are already familiar with the fairly complex Access API.  ...On the other
hand the OLE only approach lets you do anything that you can do in access,
so it is a lot more powerful than the DBI or ADO approach (at the cost of
complexity).

Rob

-Original Message-
From: Chris Benco [mailto:Chris.Benco;austinpowder.com]
Sent: Wednesday, October 23, 2002 1:07 PM
To: [EMAIL PROTECTED]
Subject: Looking for some Documentation


Trying to get a script to read information from an old access 97 database.
Just looking for a place to start.  Is this going to be a DBI/ODBC issue?
or OLE?  Just looking for a point in the right direction.

Chris Benco
[EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Looking for some Documentation

2002-10-23 Thread shawn_milochik

Chris,

I'm still new to Perl, but here's some code that writes to an Access
database.  Maybe it will be a starting point.  You will need the
module 'DBD::ODBC', which you can find at search.cpan.org, or, if you have
ppm installed, run ppm and type install DBD::ODBC.

You will also need to set up an ODBC connection to the Access database.  I
did this in Windows.  If you're trying to do it on another OS, then I don't
know how that is done.  Hope this is helpful.

Shawn


BEGINNING OF CODE

#!/usr/bin/perl




use DBI;

$data_source = dbi:ODBC:rtsales;
$driver_name = ODBC;

@driver_names = DBI-available_drivers;
@data_sources = DBI-data_sources($driver_name, \%attr);


$dbh = DBI-connect($data_source, $username, $auth, \%attr);


$log = db_log.log;
if (@ARGV[0] ne ){
$log = @ARGV[0];
}
open (LOG, $log);


print LOG Database write script launched.\n;

@inFile = (rtstr, rtslsd, rtsal, rtsales, rtweek, rtwhist,
rtrates);

foreach $inFile (@inFile){

open (IN, $inFile . .csv) || die Could not open $inFile.\n;


$count = 0;
$errors = 0;

print LOG \nBeginning insert into table $inFile...   \n;

while (IN){
$_ =~ s/\'/\''/g;
$_ =~ s/\/\'/g;
#$statement = insert into rtstr
(regon,name,mangr,store,sname,design,area,smngr,sphon,smgr,sopen,sadd1,sadd2,scity,sstat,szipc)

values ($_);
$statement = insert into $inFile values ($_);
$result  = $dbh-do($statement);
if ($result != 1){
print LOG Result of $statement is: $result.\n;
$errors++;
}
$count++;
break;
}

print LOG Completed insert of $count records into table $inFile,
$errors errors.\n;

close IN;

}

$statement = UPDATE RTSAL INNER JOIN RTSALES ON (RTSAL.STORE =
RTSALES.STORE) AND (RTSAL.FISMM = RTSALES.FISMM) AND (RTSAL.FISYY =
RTSALES.FISYY) SET RTSAL.SALESTY = [rtsales].[salesty], RTSAL.SALESBUDTY
= [rtsales].[salesbudty];
$result  = $dbh-do($statement);
print LOG Result of $statement is: $result.\n;







$dbh-disconnect;
print LOG Writing rttime.html now.\n;
$result = `rttime.pl`;
print LOG Launching Epix  AS/400 FTPs now.\n;
$result = `epix_ftp.pl $log`;


END OF CODE




**
This e-mail and any files transmitted with it may contain 
confidential information and is intended solely for use by 
the individual to whom it is addressed.  If you received
this e-mail in error, please notify the sender, do not 
disclose its contents to others and delete it from your 
system.

**


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Splitting A large data file

2002-10-23 Thread Kipp, James
I am working on a Windows NT box and I don't have the luxury of any file
splitting utilities. We have a data file with fixed length records. I was
wondering the most efficient way of splitting the file into 5 smaller files.
Thought ( Hoping :-) ) some one out there may have done something like this.


Thanks !!


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: MORE Tidying up repeated data

2002-10-23 Thread John W. Krahn
Jonathan Musto wrote:
 
 Hi again all,

Hello,

 Thanks for the help before it worked a treat.  What i'm looking to do now
 with this file:
 
 ght-Skem
 ght-Skem
 ght-Skem
 hjy-TOB
 hjy-TOB
 hjy-TOB
 etcetc
 
 Aswell as removing the repeated data, i could also do with some type of
 count next to the device that shows how many times it was repeated. Like:
 
 ght-Skem 3
 hjy-TOB 3
 etc...etc...
 
 Does anyone know of a way this could be done?

perl -i~ -lne'$u{$_}++}{print$_ $u{$_}for keys%u' your_text_file


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: PERL vs. PHP?

2002-10-23 Thread Adriano Allora




Is this true?  Are there other advantages to PHP over PERL?


I guess PHP is a little simpler.

Jenda



yes, yes!, I think so: i've worked with PHP and it is (very) simpler.
but my idea is that you can make more with perl.

adr


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Oracle 8i DBI/DBM download site for Windows XP

2002-10-23 Thread Shirley Frogge
I have looked on ActiveState, but my beginner eyes didn't see anything that
looked like it was for Oracle.  I may have missed it.  If someone could
point me in the right direction...

TIA
Shirley

begin 666 InterScan_Disclaimer.txt
M5AE(EN9F]R;6%T:6]N(-O;G1A:6YE9!I;B!T:ES(4M;6%I;!IR!S
M=')I8W1L2!C;VYF:61E;G1I86P@86YD(9OB!T:4@:6YT96YD960@=7-E
M(]F('1H92!A91R97-S964@;VYL3L@:70@;6%Y(%LV\@8F4@;5G86QL
M2!PFEV:6QE9V5D(%N9]OB!PFEC92!S96YS:71I=F4N(!.;W1I8V4@
M:7,@:5R96)Y(=I=F5N('1H870@86YY(1IV-L;W-UF4L('5S92!OB!C
M;W!Y:6YG(]F('1H92!I;F9OFUA=EO;B!B2!A;GEO;F4@;W1H97(@=AA
M;B!T:4@:6YT96YD960@F5C:7!I96YT(ES('!R;VAI8FET960@86YD(UA
M2!B92!I;QE9V%L+B @268@6]U(AA=F4@F5C96EV960@=AIR!M97-S
M86=E(EN(5RF]R+!P;5AV4@;F]T:69Y('1H92!S96YD97(@:6UM961I
M871E;'D@8GD@F5T=7)N(4M;6%I;X*D-OG!OF%T92!37-T96US+!)
M;F,N(AAR!T86ME;B!E=F5R2!R96%S;VYA8FQE('!R96-A=71I;VX@=\@
M96YS=7)E('1H870@86YY(%T=%C:UE;G0@=\@=AIR!E+6UA:6P@:%S
M()E96X@W=E'0@9F]R('9IG5S97,N(!792!A8V-E'0@;F\@;EA8FEL
M:71Y(9OB!A;GD@9%M86=E('-UW1A:6YE9!AR!A(')EW5L=!O9B!S
M;V9T=V%R92!V:7)UV5S(%N9!A9'9IV4@6]U(-AG)Y(]U=!Y;W5R
M(]W;B!V:7)UR!C:5C:W,@8F5F;W)E(]P96YI;F@86YY(%T=%C:UE
+;G0N#0H-@T*#0H 
end


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Proc::Simple background processes error

2002-10-23 Thread Michael Fowler
On Wed, Oct 23, 2002 at 01:06:25PM -0400, Smith Jeff D wrote:
[snip]
   There was nothing in the documentation that said it wouldn't run
 under 5.005 but it recommends 5.6.0.  Since I'm running this old Resource
 Kit, I want to be sure that I have to upgrade to Perl 5.6 (or 5.8) for this
 module before I do all that.  
[snip]

If the module requires fork (which the error message clearly says it does)
then you'll have to upgrade.  The lowest version of Perl that supports fork
on Windows is 5.6.0.  I would suggest installing 5.6.1.


Michael
--
Administrator  www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Job completion from queue under Windows '98

2002-10-23 Thread Rajendra Babu, Praveen
Dear Gurus :-))
   I have the below scenario and very keenly on the look-out for
efficient solutions. Please do put down your expert views (I am pretty new
to Perl and Windows internals).

* I submit jobs(basically proprietary language files) with a command, let's
say resub.
* The resub command puts the jobs in a queue along with the user id. of
who has submitted. Basically, the jobs run in a remote machine(from a pool
of machines) which have higher memory capacity and speed. 
* I see the status of the jobs with another command called bqview, which
tells me whether the job is pending or running. When the job is complete, a
log file is put out into a specific directory in the form of job_name.log
* What I do is, after doing a bqview,if I don't see the job in the queue
then I know the job has completed running and then I check the
job_name.log file, manually

So to know whether a job is completed or not, I constantly need to keep
using the bqview command and see what the job status.

What I propose to do ?
  Automate the process of checking the queue and e-mail the specific user
once the job is completed. Can this be possible without me calling the
bqview external program in constant time interval within the Perl script
?? Can something like a service/daemon be done to capture the job I submit
under Windows '98  and then do a network connection to see a group of remote
machines of what is happening to the user jobs ??


 The remote machines,resub and bqview commands are no way under my
control.

Any help or directions will be very highly appreciated :-

Thanks for your infinite patience,
Regards,
Praveen


IMPORTANT-
(1) The contents of this email and its attachments are confidential and 
intended only for the individual or entity named above. Any unauthorised
use of the contents is expressly prohibited.  If you receive this email 
in error, please contact us, then delete the email.
(2) ACNielsen collects personal information to provide and market our 
services. For more information about use, disclosure and access see our 
privacy policy at www.acnielsen.com.au or contact us on 
[EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




How to rename file with a serial extension for backup?

2002-10-23 Thread chris
Before I re-invent the wheel...

I open a file for output but do not want to overwrite if it exists. It
should be renamed with a serial number as an extension

for example
filename test.txt

rename to
test.001
test.002
test.003

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: question about importing data in MS Access

2002-10-23 Thread Thanatos
Analbers, Luc wrote:

Hi,
 
Can anyone help me?
This is what I try to make:
 
I do have a Microsoft Access file on the network.
I would like to give our employees the opportunity to fill in a HTML form
(to be created in Dreamweaver) and send (store) the data to the shared
networkdirectory.
Once this is done, the data should be automatically imported in the database
and after succesfull import the sent data must be deleted automatically.
 
So generally it is about sending data (via HTML) to an Access 97 database.
 
Anyone solved this problem before?
Who can help me? What do I need to solve this issue?
 
Kind regards,
 
Luc
 
 
 
Luc Analbers 
Applicatiebeheerder  Redactie
Wegener Huis-aan-huis Kranten BV
Houten 
*:  [EMAIL PROTECTED] 
 





Hello Luc,

There is a perl module called DBD::ODBC. I have never used it but I have 
been told that you can connect to an Access database and insert records. 
( I do this all day using DBD::mysql on a MySQL database ).

What you need to do is have your HTML submit to a perl script that 
connects to the Access database and inserts the data.

Hope that helps,
Thanatos

p.s. You can read about the DBD::ODBC module here:
http://search.cpan.org/author/JURL/DBD-ODBC-0.43/ODBC.pm

Hope that helps,
Thanatos


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: question about importing data in MS Access

2002-10-23 Thread Beau E. Cox
Hi -

You need the following skills/tools to do this
(it's not too bad):

1) CGI programming (including form handling).
   Requires the CGI:: modlue.

2) DBI programing (req DBI::).

3) ODBC setup - req DBD::ODBC and you must setup
   an ODBC source in your windows system to point
   to your Access 96 db.

Of course there are other ways to do your task,
but IMHO this is most straightforward.

Can you let us know in which area/areas you need
help?

Aloha = Beau.

-Original Message-
From: Thanatos [mailto:thanatos;vcnet.com]
Sent: Wednesday, October 23, 2002 4:21 PM
To: Analbers, Luc
Cc: [EMAIL PROTECTED]
Subject: Re: question about importing data in MS Access


Analbers, Luc wrote:
 Hi,

 Can anyone help me?
 This is what I try to make:

 I do have a Microsoft Access file on the network.
 I would like to give our employees the opportunity to fill in a HTML form
 (to be created in Dreamweaver) and send (store) the data to the shared
 networkdirectory.
 Once this is done, the data should be automatically imported in the
database
 and after succesfull import the sent data must be deleted automatically.

 So generally it is about sending data (via HTML) to an Access 97 database.

 Anyone solved this problem before?
 Who can help me? What do I need to solve this issue?

 Kind regards,

 Luc


 
 Luc Analbers
 Applicatiebeheerder  Redactie
 Wegener Huis-aan-huis Kranten BV
 Houten
 *:  [EMAIL PROTECTED]
 


 


Hello Luc,

There is a perl module called DBD::ODBC. I have never used it but I have
been told that you can connect to an Access database and insert records.
( I do this all day using DBD::mysql on a MySQL database ).

What you need to do is have your HTML submit to a perl script that
connects to the Access database and inserts the data.

Hope that helps,
Thanatos

p.s. You can read about the DBD::ODBC module here:
http://search.cpan.org/author/JURL/DBD-ODBC-0.43/ODBC.pm

Hope that helps,
Thanatos


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Using CPAN.pm to Install Modules

2002-10-23 Thread eric-perl
On Wed, 23 Oct 2002, Jenda Krynicky wrote:
  I'm confounded by CPAN.pm's documentation. I've already configured the
  module but can't figure out how to 'install' a module. e.g.,
  MIME::Lite.

 Try
   cpan install MIME::Lite

That was the first thing that I tried. CPAN complained that there were no 
objects found of any type for argument MIME::Lite

  cpan i MIME/Lite

reports...

distribution id = MIME/Lite
CALLED_FORMIME/Lite

Maybe I'm using a bad mirror? CPAN is complaining that it can't find the 
file. (I'm using cloud9.net.) How can I update the list?

-- 
Eric P.
Sunnyvale, CA


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Internet Explorer Session Count *Windows 98*

2002-10-23 Thread Voodoo Raja
I am doing a POS for a Internet cafe' with 60 workstations .
I would like to sync the POS to check for active IExplorer windows over the 
LAN through the MFC or the registry... I em pretty sure that it does store a 
session count in the registry.. but could not get to the right key after 2 
week of hard surfing.

Hope one has got the right piece of code I am looking for.. any bit can be a 
helpful bit.

Seeking all ur help
Voodoo Man!

http://www.voodoofiji.web1000.com Life will never be the same!

_
Broadband? Dial-up? Get reliable MSN Internet Access. 
http://resourcecenter.msn.com/access/plans/default.asp


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]