RE: Job completion from queue under Windows '98

2002-10-24 Thread Rajendra Babu, Praveen
Thanks for your insights,Jenda.
Please find my answers embedded within your questions.[ between >> ]

-Original Message-
From: Jenda Krynicky [mailto:Jenda@;Krynicky.cz]
Sent: Thursday, 24 October 2002 10:02 PM
To: Rajendra Babu, Praveen; '[EMAIL PROTECTED]'
Subject: Re: Job completion from queue under Windows '98


From:   "Rajendra Babu, Praveen" 
<[EMAIL PROTECTED]>
> * 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 .log 

Where is that specific directory? On the mechine that processed the 
job? Or is there a common directory somewhere? How do you know who 
submited the job?

> 
It is a very specific network directory(H:\output\test) and any machine the
job is processed it is placed in the same directory(H:\output\test). The
"resub" command picks up the user id. while the user submits the job.
>

Is the log file created as soon as the job is started being processed 
and is beging modified during the processing or is it created after 
the job completes. I mean ... is it safe to assume that if there is 
that file the job has completed?

>
When the job starts up, it starts creating a log file simultaneously. It is
very safe to assume as and when the whole the log file is complete then the
process/job is complete too. Just now, I posted a reply "Re:Monitoring a
file's status..." to the group. With this approach of checking the log file
continuously, i.e. when the log file is completely updated by the process, I
am sure that my job is complete in the remote machine.
 I BELIEVE THIS SOLUTION OF CHECKING LOG FILE WILL WORK OUT.
>>

You could run a script there that would test for new files in this 
directory, this script could run anywhere.

Another option would be to "watch" that directory with 
Win32::ChangeNotify, but the computer where is this directory and 
where the script runs must be WinNT/2k/XP.

In either case you


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

Well ... how do you know then that someone has submited something?
If you could force them to submit the jobs using your script that 
would do something and then run resub. Otherwise the only chance you 
have to find out someone has submited anything is to run the bqview.

> This is currently only for my working alone and to make things quicker
for me[may be meddle more with Perl after doing for what I am paid]
>

 Thanks again for your time and alternatives. Will need to 
re-visit your suggestions as and when I plan to move the script for other
users.

Thanks again,
Praveen

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

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  or contact us on 
[EMAIL PROTECTED]

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




Re: How to rename file with a serial extension for backup?

2002-10-24 Thread John W. Krahn
Chris wrote:
> 
> On Thu, 24 Oct 2002 00:03:48 -0700, [EMAIL PROTECTED] (John W. Krahn)
> wrote:
> 
> >You mean something like this:
> >
> >my ( $file, $ext );
> >do  {
> >$file = sprintf 'test.%03d', ++$ext;
> >} while -e $file;
> >
> >open OUT, "> $file" or die "Cannot open $file: $!";
> 
> Exactly. Thank you.
> 
> I received so many good suggestions. Thanks to all.
> 
> my $testfile = 'test.txt';
> my ( $file, $ext );
> if (-e $testfile){
> do  {
> $file = sprintf 'test.%03d', ++$ext;
> } while -e $file;
> rename ($testfile, $file);
> }
> 
> open $fh, "> $testfile" or die "Cannot open $file: $!";


You don't really need the do/while loop in this case and you should
include an error message if the rename fails.  Also, you could limit the
scope on the temporary variables.

my $testfile = 'test.txt';

{ my ( $file, $ext ) = $testfile;
if ( -e $file ) {
$file = sprintf 'test.%03d', ++$ext while -e $file;
rename $testfile, $file or die "Cannot rename $testfile: $!";
}
}

open my $fh, '>', $testfile or die "Cannot open $testfile: $!";



John
-- 
use Perl;
program
fulfillment

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




search results

2002-10-24 Thread Mariusz
Hi,
How can I display certain number of search matches per page? I was thinking to pass 
the record ID as a hidden field from page to page and then repeat the search on each 
page, but is there a better way?

thanks,
M



Re: a speedy find & grep?

2002-10-24 Thread Jeff 'japhy' Pinyan
On Oct 24, Deb said:

>Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> had this to say,
>>
>> Why not use the -r option to e?grep to do recursive searches?
>>
>>   egrep -r pattern .
>
>H... Well, on Solaris 5.7, there is no -r option :-(.

Ouch.  A grep variant with no recursive-feature?

>Could you, by any chance, be referring to a GNU egrep?  If so, I can go
>check it out - I'm always up for a good util...

Yeah, GNU egrep.

-- 
Jeff "japhy" Pinyan  [EMAIL PROTECTED]  http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
 what does y/// stand for?   why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


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




Re: a speedy find & grep?

2002-10-24 Thread Deb
Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> had this to say,
> 
> Why not use the -r option to e?grep to do recursive searches?
> 
>   egrep -r pattern .

H... Well, on Solaris 5.7, there is no -r option :-(.

Could you, by any chance, be referring to a GNU egrep?  If so, I can go
check it out - I'm always up for a good util...

deb


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  There are 010 types of people in the world:
  those that understand binary, and those that don't.
ô¿ô
 ~ 

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




RSS feed without a Mod

2002-10-24 Thread Troy May
I was wondering if anybody knew of a complete script that can convert RSS
feeds to HTML without the normal needed mod (XML::RSS?), to be used as an
SSI on my page.  My ISP will not install this mod for me.  So I need one
script that does it all with just an external URL for the input source.

Any ideas?

Troy


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




Re: a speedy find & grep?

2002-10-24 Thread Jeff 'japhy' Pinyan
On Oct 24, Deb said:

> From the command-line, I'm currently running a find command piped to
>xargs grep:
>
> find . -f print | xargs egrep "some string to look for"

Why not use the -r option to e?grep to do recursive searches?

  egrep -r pattern .

-- 
Jeff "japhy" Pinyan  [EMAIL PROTECTED]  http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
 what does y/// stand for?   why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


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




OpenGL

2002-10-24 Thread Fernando Monteiro Duarte
   Hi everyone,

   Does anybody here have already works with OpenGL module for Perl, and 
knows a place to find more related documentation about it??

   Thanks in advance,
   Fernando Monteiro Duarte

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




a speedy find & grep?

2002-10-24 Thread Deb
re: Unix

 From the command-line, I'm currently running a find command piped to
xargs grep:

 find . -f print | xargs egrep "some string to look for"

There is an occassional requirement that this be done and it must parse
a hierarchy of directories and files which number in the many thousands.

Run from the commandline takes a long, long time.  I even re-niced the
command -10 as root, but it still takes hours.

Would perl be able to optimize the search and grep better than what I am
currently doing?  

Ideas, jokes and rants are appreciated...

:-)

deb


-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  There are 010 types of people in the world:
  those that understand binary, and those that don't.
ô¿ô
 ~ 

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




Re: How to rename file with a serial extension for backup?

2002-10-24 Thread chris
On Thu, 24 Oct 2002 00:03:48 -0700, [EMAIL PROTECTED] (John W. Krahn)
wrote:

>You mean something like this:
>
>my ( $file, $ext );
>do  {
>$file = sprintf 'test.%03d', ++$ext;
>} while -e $file;
>
>open OUT, "> $file" or die "Cannot open $file: $!";

Exactly. Thank you. 

I received so many good suggestions. Thanks to all.

my $testfile = 'test.txt';
my ( $file, $ext );
if (-e $testfile){
do  {
$file = sprintf 'test.%03d', ++$ext;
} while -e $file;
rename ($testfile, $file);
}

open $fh, "> $testfile" or die "Cannot open $file: $!";


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




Re: Email Script Help

2002-10-24 Thread Steve Grazzini
Bill O'Reilly <[EMAIL PROTECTED]> wrote:
> 
> I am trying to setup a script on a linux (RedHat 7.3) box that 
> when someone copies a file to a particular folder it would trigger 
> an email being sent to a user. There are multiple folders I would 
> like to add this script to that all I would need to do would be to 
> change the subject line of the email.
> 
> Does anyone have any suggestions on where I can look to write 
> something like this or ideas on writing it? Is this possible?
>

The tricky bit is monitoring the directory.

You should be able to use FAM, which is pretty
slick:

  http://search.cpan.org/author/JGLICK/SGI-FAM-1.002/lib/SGI/FAM.pm
  http://oss.sgi.com/projects/fam/links.html

But normally, you just poll:

  #!/usr/bin/perl
  use strict;
  use warnings;

  sub difference {
my %diff;
@diff{ @{$_[0]} } = ();
delete @diff{ @{$_[1]} };
sort keys %diff;
  }

  my $dirname = shiftor die "usage: $0 ";
  opendir DIR, $dirname  or die "opendir $dirname: $!";

  my @old = readdir DIR;

  while (sleep 1) {
rewinddir DIR
  or die "rewinddir: $!";

my @current = readdir DIR;
print "$_\n" for difference \@current, \@old;

@old = @current;
  }

And there are lots of modules for sending mail on CPAN.

Maybe try try Mail::Mailer or Mail::Sender.

-- 
Steve

perldoc -qa.j | perl -lpe '($_)=m("(.*)")'

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




Re: Large numbers

2002-10-24 Thread Jim Thomason
How about:

use Math::BigInt;
use Math::BigFloat;

Jim

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




Re: Email Script Help

2002-10-24 Thread Mark Goland
Well you could write a script that traverses those directory's every X
minutes and stores all files. If a new record is found do a stat on a file
get UID of creator do UID->username converssion, and a new entry and then
e-mail away. Other then that, you would have to look into file system code,
to find if it can report a creation of a new file.

Mark
- Original Message -
From: "Bill O'Reilly" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 23, 2002 3:00 PM
Subject: Email Script Help


> Hi,
>
> I am trying to setup a script on a linux (RedHat 7.3) box that when
someone
> copies a file to a particular folder it would trigger an email being sent
to
> a user. There are multiple folders I would like to add this script to that
> all I would need to do would be to change the subject line of the email.
>
> Does anyone have any suggestions on where I can look to write something
like
> this or ideas on writing it? Is this possible?
>
> Thanks much,
>
> Bill O'Reilly
>
>
>
> --
> 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: Configuration files

2002-10-24 Thread Michael Fowler
On Thu, Oct 24, 2002 at 05:18:07PM +0530, vinai AR wrote:
> 1. Is there any functions in perl like GetProfileString( ) and
> SetProfileString( )  SDK functions, which are  used to access the
> windows INI files.

Not built in.  The Config::Ini module available on CPAN provides an
interface to parsing ini files.


> 2. We were also suggested to use hash list instead of configuration
> file to give input to the
> library. Is this is efficient or any other efficient method is there.

Passing a hash around is naturally going to be faster than passing a
filename around that must be continually re-parsed.


> **Disclaimer
> 
> Information contained in this E-MAIL being proprietary to Wipro Limited is 
> 'privileged' and 'confidential' and intended for use only by the individual
>  or entity to which it is addressed. You are notified that any use, copying 
> or dissemination of the information contained in the E-MAIL in any manner 
> whatsoever is strictly prohibited.
> 
> ***

Ugh.
 

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

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




Re: How to rename file with a serial extension for backup?

2002-10-24 Thread Mark Goland
it means that the variable was only used once, cuased by -w. Since you dont
usualy declair variables once, with out using them. Warn will generate that
message.

Mark
- Original Message -
From: "Satheesh Ramamoorthy" <[EMAIL PROTECTED]>
To: "'Mark Goland'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 3:14 AM
Subject: RE: How to rename file with a serial extension for backup?


> Though it executes as intended, there is a warning message as "Name
> "main::FH" used only once: possible typo at fren.pl line 5.", what does
that
> mean?
>
> Thanks,
> _S_
>
> -Original Message-
> From: Mark Goland [mailto:mgoland@;optonline.net]
> Sent: Thursday, October 24, 2002 12:08 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to rename file with a serial extension for backup?
>
>
> You can probebly make it work with open, I am nto sure how to. This will
> work...
> #!/usr/local/bin/perl -w
> use Fcntl; # for perm constants
> use Errno; # for errno constants
>
> unless ( sysopen ($FH,"test.txt",O_WRONLY|O_CREAT|O_EXCL, 0744) ){
>
>  if( $!{EEXIST} ){
>   print "file exists \n ";
>   # rename it here
>  }
>  }
>
>
>
> - Original Message -
> From: "chris" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 23, 2002 9:32 PM
> Subject: How to rename file with a serial extension for backup?
>
>
> > 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]
> >
> >
>
>
>
> --
> 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]
>



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




Re: Large numbers

2002-10-24 Thread Tanton Gibbs
You'll have to reinstall ActiveState, but I'm not that familiar with
ActiveState so I'm not sure what flags should be set.  Do you have the
latest version?  If not, you might just try that and see what it does.
There should be a way to turn large file support on...maybe someone on this
list who uses ActiveState would know how.
- Original Message -
From: "Goodman Kristi - kgoodm" <[EMAIL PROTECTED]>
To: "'Tanton Gibbs'" <[EMAIL PROTECTED]>; "Goodman Kristi - kgoodm"
<[EMAIL PROTECTED]>; "'Robert Citek'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 4:43 PM
Subject: RE: Large numbers


> Yes, some of them are several GB, around 100 GB.
>
> How do I change that?
>
>
> -Original Message-
> From: Tanton Gibbs [mailto:thgibbs@;deltafarms.com]
> Sent: Thursday, October 24, 2002 3:36 PM
> To: Goodman Kristi - kgoodm; 'Robert Citek'
> Cc: [EMAIL PROTECTED]
> Subject: Re: Large numbers
>
>
> You do not have USE_LARGE_FILE support enabled.  This could be causing the
> problem.  However, it will only cause a problem for files larger than 2G.
> Are the files giving you problems larger than 2G?
> - Original Message -
> From: "Goodman Kristi - kgoodm" <[EMAIL PROTECTED]>
> To: "'Tanton Gibbs'" <[EMAIL PROTECTED]>; "'Robert Citek'"
> <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, October 24, 2002 4:24 PM
> Subject: RE: Large numbers
>
>
> > Here is the output from perl -V
> >
> >
> > Summary of my perl5 (revision 5 version 6 subversion 1) configuration:
> >   Platform:
> > osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
> > uname=''
> > config_args='undef'
> > hint=recommended, useposix=true, d_sigaction=undef
> > usethreads=undef use5005threads=undef useithreads=define
> > usemultiplicity=define
> > useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
> > use64bitint=undef use64bitall=undef uselongdouble=undef
> >   Compiler:
> > cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
>
> -DNO_STRICT -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
> > -DPERL_MSVCRT_READFIX',
> > optimize='-O1 -MD -DNDEBUG',
> > cppflags='-DWIN32'
> > ccversion='', gccversion='', gccosandvers=''
> > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
> > d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
> > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> > lseeksize=4
> > alignbytes=8, usemymalloc=n, prototype=define
> >   Linker and Libraries:
> > ld='', ldflags ='-nologo -nodefaultlib -release
> > -libpath:"C:\Perl\lib\CORE"  -machine:x86'
> > libpth="C:\Perl\lib\CORE"
> > libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
> > comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib
> > uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib
> odbccp32.lib
> > msvcrt.lib
> > perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib
winspool.lib
> > comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib
netapi32.lib
> > uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib
> odbccp32.lib
> > msvcrt.lib
> > libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib
> >   Dynamic Linking:
> > dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
> > cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release
> > -libpath:"C:\Perl\lib\CORE"  -machine:x86'
> >
> >
> > Characteristics of this binary (from libperl):
> >   Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT
> > PERL_IMPLICIT_SYS
> >   Locally applied patches:
> >   ActivePerl Build 626
> >   Built under MSWin32
> >   Compiled at May  2 2001 01:31:15
> >   %ENV:
> > PERLDB_OPTS="RemotePort=127.0.0.1:2000"
> >   @INC:
> > C:/Perl/lib
> > C:/Perl/site/lib
> > .
> >
> > -Original Message-
> > From: Tanton Gibbs [mailto:thgibbs@;deltafarms.com]
> > Sent: Thursday, October 24, 2002 2:37 PM
> > To: Goodman Kristi - kgoodm; 'Robert Citek'
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: Large numbers
> >
> >
> > Can you run perl -V and send the results to the list.  It may be that
you
> > didn't compile with USE_LARGE_FILES.  Are you using ActiveState perl?
> > - Original Message -
> > From: "Goodman Kristi - kgoodm" <[EMAIL PROTECTED]>
> > To: "'Robert Citek'" <[EMAIL PROTECTED]>
> > Cc: <[EMAIL PROTECTED]>
> > Sent: Thursday, October 24, 2002 12:00 PM
> > Subject: RE: Large numbers
> >
> >
> > > I am running WIN2000 and perl 5.6.1
> > >
> > >
> > >
> > > -Original Message-
> > > From: Robert Citek [mailto:rwcitek@;alum.calberkeley.org]
> > > Sent: Thursday, October 24, 2002 11:02 AM
> > > To: Goodman Kristi - kgoodm
> > > Cc: '[EMAIL PROTECTED]'
> > > Subject: Re: Large numbers
> > >
> > >
> > >
> > > Hello Kristi,
> > >
> > > At 10:22 AM 10/24/2002 -0500, Goodman Kristi - kgoodm wrote:
> > > >Does anyone know why Pe

RE: local()! Explain, please?

2002-10-24 Thread Nikola Janceski
I was using $\ globally for a larger script, but it adverse affects.
Thanks to you and Jenda I now know that local doesn't act exactly like my.

local() should be explained by it globally changing a variable but only to
the end of the file/block/eval and
my() makes a variable only exist, uniquely, within the encloseing
file/block/eval.

Thanx to all for clearing that up for me.

:)

Nikola Janceski

like you walked out of the desert with the camel on your back.



> -Original Message-
> From: Michael Fowler [mailto:michael@;shoebox.net]
> Sent: Thursday, October 24, 2002 4:23 PM
> To: Nikola Janceski
> Cc: Beginners (E-mail)
> Subject: Re: local()! Explain, please?
> 
> 
> On Thu, Oct 24, 2002 at 03:24:14PM -0400, Nikola Janceski wrote:
> > Then I am really confused, how can I cause the scope of $\ 
> to extend only to
> > the end of the file and not into the other modules??
> 
> You can't.  However, you might be able to confine your local 
> version of $\
> to only those operations you want.  I tried to go back to 
> your original code
> to give you an example of this, but it wasn't clear to me 
> what exactly you
> wanted affected by your version of $\, and what should've 
> been left alone. 
> 
> 
> > #!yourperl
> > my $\ = "\n";
> > __END__
> > 
> > I get this error:
> > 
> > Can't use global $\ in "my" at /usr/nj/pl.pl line 4, near "my $\ "
> > Execution of /usr/nj/pl.pl aborted due to compilation errors.
> 
> These special variables are global.  Even if you could manage 
> to lexically
> scope them they wouldn't be the same variable any more than 
> the two $foo
> variables would be with 'our $foo; my $foo;'
> 
> 
> Michael
> --
> Administrator  www.shoebox.net
> Programmer, System Administrator   www.gallanttech.com
> --
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



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: Large numbers

2002-10-24 Thread Goodman Kristi - kgoodm
Yes, some of them are several GB, around 100 GB.

How do I change that?


-Original Message-
From: Tanton Gibbs [mailto:thgibbs@;deltafarms.com]
Sent: Thursday, October 24, 2002 3:36 PM
To: Goodman Kristi - kgoodm; 'Robert Citek'
Cc: [EMAIL PROTECTED]
Subject: Re: Large numbers


You do not have USE_LARGE_FILE support enabled.  This could be causing the
problem.  However, it will only cause a problem for files larger than 2G.
Are the files giving you problems larger than 2G?
- Original Message -
From: "Goodman Kristi - kgoodm" <[EMAIL PROTECTED]>
To: "'Tanton Gibbs'" <[EMAIL PROTECTED]>; "'Robert Citek'"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 4:24 PM
Subject: RE: Large numbers


> Here is the output from perl -V
>
>
> Summary of my perl5 (revision 5 version 6 subversion 1) configuration:
>   Platform:
> osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
> uname=''
> config_args='undef'
> hint=recommended, useposix=true, d_sigaction=undef
> usethreads=undef use5005threads=undef useithreads=define
> usemultiplicity=define
> useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
> use64bitint=undef use64bitall=undef uselongdouble=undef
>   Compiler:
> cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
> -DNO_STRICT -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
> -DPERL_MSVCRT_READFIX',
> optimize='-O1 -MD -DNDEBUG',
> cppflags='-DWIN32'
> ccversion='', gccversion='', gccosandvers=''
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
> d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> lseeksize=4
> alignbytes=8, usemymalloc=n, prototype=define
>   Linker and Libraries:
> ld='', ldflags ='-nologo -nodefaultlib -release
> -libpath:"C:\Perl\lib\CORE"  -machine:x86'
> libpth="C:\Perl\lib\CORE"
> libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
> comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
> uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib
odbccp32.lib
> msvcrt.lib
> perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
> comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
> uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib
odbccp32.lib
> msvcrt.lib
> libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib
>   Dynamic Linking:
> dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
> cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release
> -libpath:"C:\Perl\lib\CORE"  -machine:x86'
>
>
> Characteristics of this binary (from libperl):
>   Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT
> PERL_IMPLICIT_SYS
>   Locally applied patches:
>   ActivePerl Build 626
>   Built under MSWin32
>   Compiled at May  2 2001 01:31:15
>   %ENV:
> PERLDB_OPTS="RemotePort=127.0.0.1:2000"
>   @INC:
> C:/Perl/lib
> C:/Perl/site/lib
> .
>
> -Original Message-
> From: Tanton Gibbs [mailto:thgibbs@;deltafarms.com]
> Sent: Thursday, October 24, 2002 2:37 PM
> To: Goodman Kristi - kgoodm; 'Robert Citek'
> Cc: [EMAIL PROTECTED]
> Subject: Re: Large numbers
>
>
> Can you run perl -V and send the results to the list.  It may be that you
> didn't compile with USE_LARGE_FILES.  Are you using ActiveState perl?
> - Original Message -
> From: "Goodman Kristi - kgoodm" <[EMAIL PROTECTED]>
> To: "'Robert Citek'" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, October 24, 2002 12:00 PM
> Subject: RE: Large numbers
>
>
> > I am running WIN2000 and perl 5.6.1
> >
> >
> >
> > -Original Message-
> > From: Robert Citek [mailto:rwcitek@;alum.calberkeley.org]
> > Sent: Thursday, October 24, 2002 11:02 AM
> > To: Goodman Kristi - kgoodm
> > Cc: '[EMAIL PROTECTED]'
> > Subject: Re: Large numbers
> >
> >
> >
> > Hello Kristi,
> >
> > At 10:22 AM 10/24/2002 -0500, Goodman Kristi - kgoodm wrote:
> > >Does anyone know why Perl has a hard time with large numbers and
> sometimes
> > >turns them into negative numbers?  Sorry if I am not being specific
> enough,
> > >but really all I am doing is calculating the number of records in a
file
> > and
> > >if it is a large number of records (lets say over a million) it will
> return
> > >a negative number for some reason.
> >
> > Could you please provide an example?  Also on what operating system are
> you
> > using perl?  What perl version ('perl -V')?
> >
> > For exampe, this piece of code works just find on Cygwin and Linux:
> >   perl -e '$a=100 ; $a++ ; print $a, "\n" ;
> >
> > You must agree that 1 + 10^14 (~100 Terabytes) is a pretty big number.
I
> > doubt you have a file that has that many records.
> >
> > Regards,
> > - Robert
> >
> >
> > 

Re: Using CPAN.pm to Install Modules

2002-10-24 Thread eric-perl
On Thu, 24 Oct 2002, Jenda Krynicky wrote:
> Maybe you should try a different mirror.

Is there a command to update my urllist *interactively* (just like during 
the initial configuration)? If not: Where can I find a list of mirrors?

-- 
Eric P.
Sunnyvale, CA


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




Re: Mail Problem. Can Anyone Help Me?

2002-10-24 Thread dan
install this:
http://www.cpan.org/authors/id/J/JE/JENDA/Mail-Sender-0.8.00.tar.gz

dan

"Bootscat" <[EMAIL PROTECTED]> wrote in message
news:002701c27b63$c28881e0$f89c3dd0@;dhoggard...
I'm setting up a mysqls email list.

In the config file it has this varables
# Path to SendMail
$mailprog = "/usr/sbin/sendmail";
$smtp_server = "localhost.com";

When I try to login I get this:

Can't locate Mail/Sender.pm in @INC (@INC contains:
/usr/lib/perl5/5.6.1/i686-linux /usr/lib/perl5/5.6.1
/usr/lib/perl5/site_perl/5.6.1/i686-linux /usr/lib/perl5/site_perl/5.6.1
/usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at admin.cgi line
1134.
BEGIN failed--compilation aborted at admin.cgi line 1134.

This is the line in the script it refers to:

   use Mail::Sender;
   ref ($sender = new Mail::Sender({from => $admin_email,smtp =>
$smtp_server})) or die "$Mail::Sender::Error\n";
   while ($pointer = $sth->fetchrow_hashref) {
 $new_contact = $pointer->{"Contact"};
 (ref ($sender->MailMsg({to =>$new_contact, subject => $msubject, msg =>
$mmessage}))
  and print ""
 )
 or die "$Mail::Sender::Error\n";
   }
   $sth->finish;
   $dbh->disconnect;

Can someone tell me how to correct this problem?

Thanks and God Bless
Dan



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




Large numbers

2002-10-24 Thread Goodman Kristi - kgoodm
Does anyone know why Perl has a hard time with large numbers and sometimes
turns them into negative numbers?  Sorry if I am not being specific enough,
but really all I am doing is calculating the number of records in a file and
if it is a large number of records (lets say over a million) it will return
a negative number for some reason.  
 
Any help appreciated.
Thanks,
Kristi


**
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.




Re: Large numbers

2002-10-24 Thread Nigel Wetters
On Thu, 2002-10-24 at 16:22, Goodman Kristi - kgoodm wrote:
> Does anyone know why Perl has a hard time with large numbers...
>
> ...lets say over a million...

That's not really a large number, and Perl should have no difficulty
with it. Could you provide an example of code that produces this
problem?
-- 
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]




Re: Large numbers

2002-10-24 Thread Robin Cragg
Hi Kristi
,


perl is like most other languages. It counts in binary.  The way signed )ie 
ones that can be positive or negative) are differentiated is the first bit. 
If the first bit is negative, the number is negative.  If I use 3 bit 
numbers, I would count like this:

000 0
001 1
010 2
011 3
100 -3
101 -2
110 -1
111 -0

So when I add 1 to 3, I actually get -3.

Obviously PERL uses much larger numbers than my puny 3 bit numbers, but the 
same thing applies, you just have to count a lot higher.


R




At 10:22 24/10/2002 -0500, Goodman Kristi - kgoodm wrote:
Does anyone know why Perl has a hard time with large numbers and sometimes
turns them into negative numbers?  Sorry if I am not being specific enough,
but really all I am doing is calculating the number of records in a file and
if it is a large number of records (lets say over a million) it will return
a negative number for some reason.

Any help appreciated.
Thanks,
Kristi


**
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination,
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.



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




Re: DBIx::HTMLView module

2002-10-24 Thread Nigel Wetters
On Thu, 2002-10-24 at 15:41, bioinfo Gu wrote:
> 
> Hi, I am install DBIx::HTMLView module on perl-5.6.1

Ensure you have all the prerequisites, including CGI, DBI, URI::Escape,
DBD::mysql, and (maybe) Apache::DBI. Unfortunately, the author hasn't
mentioned these in the makefile, so their lack will produce no errors
during the build process, only during testing.

If you still have problems after installing prerequisites, raise a bug
against the module here:
  http://rt.cpan.org/NoAuth/ReportBug.html?Queue=DBIx-HTMLView

-- 
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]




Re: Splitting A large data file

2002-10-24 Thread Todd W


Javeed Sar wrote:

i split one perl script, it got split ,i combined it , it's not working???
Though the siza are same.
what is the problem.



Mak sure you completely read the posts. When you asked how to join them 
back together I said the following would work:

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

but I also said this:

note the ordering is different, because the program below (snipped for 
this post) 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.

Hence your result file was the same size, but not the "same file".

If you need to get the same file back out and you used the 
Text::Splitfile package I posted, you need to do the reverse of what it 
does. Create an array of the filehandles, loop over them in a circle, 
and print each line to your one big datafile.

Todd W.



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



Re: Large numbers

2002-10-24 Thread Robert Citek

Hello Kristi,

At 10:22 AM 10/24/2002 -0500, Goodman Kristi - kgoodm wrote:
>Does anyone know why Perl has a hard time with large numbers and sometimes
>turns them into negative numbers?  Sorry if I am not being specific enough,
>but really all I am doing is calculating the number of records in a file and
>if it is a large number of records (lets say over a million) it will return
>a negative number for some reason.  

Could you please provide an example?  Also on what operating system are you
using perl?  What perl version ('perl -V')?

For exampe, this piece of code works just find on Cygwin and Linux:
  perl -e '$a=100 ; $a++ ; print $a, "\n" ;

You must agree that 1 + 10^14 (~100 Terabytes) is a pretty big number.  I
doubt you have a file that has that many records.

Regards,
- Robert


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




Handling and Replacing Info Problem

2002-10-24 Thread Darryl Schnell
I am currently working on a ldapsearch program that is suppose to take
fields in ldap and replace them with other data if the info in the ldap
database match, however I have one line that has more then one piece of
data and is seperated by spaces:

mailaltneraddress = [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]

Basically what I want to do is replace:

[EMAIL PROTECTED] and [EMAIL PROTECTED] with something like 

[EMAIL PROTECTED] [EMAIL PROTECTED]

The problem is this line never contains the same number of input:

IE 

One user could have:

mailaltneraddress = [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]

While another could have:

mailaltneraddress = [EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]

Does anyone have any suggestions on how to accomplish this. I've tried
something like this:

$result_count = @mailalt;

for ($i=0; $i <= $result_count; $i++) {
 if (($mailalt[$i] =~ m/$emailname\@domain1.com/) or ($mailalt[$i] =~
m/$emailname\@domain2.com/)) {
   $mailalt[$i] = pop(@mailalt);
 }
}

Am I on the right track or is there a better way of trying to do this?

Any help anyone can offer is appreciated. If you need more info let me
know.

Thanks,
D


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




Block Size

2002-10-24 Thread Janfek Esquivel
I'm using SDBM and my actual block size is the default 1K, what I want to 
know is how do I change this default setting to make this block size bigger.
Thanks in advance.




_
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]



RE: Large numbers

2002-10-24 Thread Nigel Wetters
On Thu, 2002-10-24 at 16:57, Goodman Kristi - kgoodm wrote:
> $recs = (-s "$outname.src") / $recl;
>
> ... on some large files, it will return a negative amount of
> records.

>From the snippet of code you've given me, it looks like $recl is
sometimes set to a negative number. Can you post the code that
calculates $recl to the list?




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




Re: Perl on a Palm?

2002-10-24 Thread Angela Fisher

According to perl.com, there are no ports for PalmOS.
http://www.perl.com/CPAN/ports/

Angela

[EMAIL PROTECTED] wrote:
> 
> Does anyone know if it's possible to execute Perl scripts on the Palm OS?
> Does anyone here do any Palm OS programming of any kind?  What free toolkit
> is available for it?
> 
> Shawn
> 
> **
> 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]

-- 


Angela Fisher   [EMAIL PROTECTED]
Agfa Corporation
46 River Rd.Phone: 603.889.3653  x3021
Hudson, NH 03051Fax:   603.886.0597

In Unix Land, on a quiet night you can hear
the Windows machines reboot.

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




Re: mondo makefile

2002-10-24 Thread George
Three reasons.
  1. A friend asked me to help him with this because he will likely have to support it 
and wants to trim it down.
  2. So he and I can better understand makefiles in general and what's really not 
needed can be omitted.
  3. Portability is not an issue, this will only be used on MacOS_X.

Sign up for Internet Service under $10 dollars a month, at http://isp.BlueLight.com

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




Re: Use of uninitialized value at ./tablecomp.pl line 780, chunk 299

2002-10-24 Thread Frank Wiles
 .--[ naveen prabhakar wrote (2002/10/24 at 10:43:50) ]--
 | 
 |  
 |  Hi,this might be a really silly question.
 |  
 |  what values are considered as uninitialized.how can I avoid this error.
 |  
 |  what does chunk 299 mean.the chunk number remains the same for a
 |  series of  such error statements.I have just tried to read from a file
 |  into an array of records and a hash of records
 |  
 |  Use of uninitialized value at ./tablecomp.pl line 780,  chunk 299
 |  
 |  the line at 780 is.
 |  
 |  if($db2array->[$i]->{$db2key} ne $raimah->{$id}->{$db2key})
 |  
 `-

This is a warning telling you that either
$db2array->[$i]->{$dbh2key} or $raimah->{$id}->{$dbh2key} was not
set as you are reading chunk '299' of the file you are reading. 
By not 'set' I mean there wasn't any data to put into one of these
arrays or hash locations.

There are three possible ways I can think of off the top of my head to
get rid of this message: 

1) Run without warnings ( not recommended ) 
2) Make sure all values of $db2array and $raimah are initialized at
   some point no matter what is contained in the file 
3) Make sure the contents of the file you are reading have values
   for all possible fields/values/etc. 

Hope this helps. 

 -
   Frank Wiles <[EMAIL PROTECTED]>
   http://frank.wiles.org
 -


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




local()! Explain, please?

2002-10-24 Thread Nikola Janceski
Okay, I was fuming mad. I have been struggling with a program that is
supposed to send a simple e-mail...
or so I thought!

for 2 days I have sent test e-mails all of them with headers in the e-mail
and attachments all screwy.
then I found the culprit.

at the top of my script is:

local $\ = "\n";

now ... isn't local supposed to "modify the listed variables to be local to
the enclosing block, file, or eval." ?

then why when I set this variable just before some code (Mail::Sender or
MIME::Entity) that builds the e-mail and sends it, that the e-mail ALWAYS
comes out wrong (wrong == improper formatting, wrong headers, bad multipart,
etc.).

below I have attached some sample code for both modules with the local $\ =
"\n" [untested sample code but should be 95% correct since I just change
some private items to garbage]...

Am I just misunderstanding the use of local?

Thank you for any explaination to this behavior,

Nikola Janceski

The average person thinks he isn't. 
-- Father Larry Lorenzoni 


use MIME::Entity;

local $\ = "\n";

my $top = MIME::Entity->build(
Type=> "multipart/mixed",
From=> "nikola_janceski\@summithq.com",
To  => '[EMAIL PROTECTED]',
Subject => "something"
);
$top->attach(Data=>"duh duh duh");
my $file = "/usr/nj/somefile";
if(-f $file){
$top->attach(
Path=> $file,
Type=> "text/plain",
Encoding=> "base64");
}

open MAIL, "| /usr/lib/sendmail -t -oi -oem -f 'klehman\@summithq.com'" or
die "open: $!";
$top->print(\*MAIL); ## this is a method call which shouldn't be touched
by the local $\ right?
close MAIL;


 similar problems when using Mail::Sender;
use Mail::Sender;

local $\ = "\n";

my $sender;
ref($sender = new Mail::Sender
  {smtp => 'mail.localhost.com'}) || die "new $sender --
$Mail::Sender::Error\n";

ref($sender->OpenMultipart({from => $from.'@summithq.com', to =>
'[EMAIL PROTECTED]',
   subject => $subject}) ) || die "OpenMultipart
$Mail::Sender::Error\n";

$sender->Body();
$sender->Send("duh duh duh");

my $file = "/usr/nj/somefile";
if( -f $file ){
$sender->SendFile({
ctype => 'text/plain',
encoding => 'base64',
file => "$file"
}) || die "$Mail::Sender::Error\n";
}

$sender->Close() || die "$Mail::Sender::Error\n";



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]




Use of uninitialized value at ./tablecomp.pl line 780, chunk 299

2002-10-24 Thread naveen prabhakar

Hi,this might be a really silly question.

what values are considered as uninitialized.how can I avoid this error.

what does chunk 299 mean.the chunk number remains the same for a series of  such error 
statements.I have just tried to read from a file into an array of records and a hash 
of records

Use of uninitialized value at ./tablecomp.pl line 780,  chunk 299

the line at 780 is.

if($db2array->[$i]->{$db2key} ne $raimah->{$id}->{$db2key})

 

thank you naveen



-
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site


Re: local()! Explain, please?

2002-10-24 Thread Jenda Krynicky
From: Nikola Janceski <[EMAIL PROTECTED]>
> Okay, I was fuming mad. I have been struggling with a program that is
> supposed to send a simple e-mail... or so I thought!
> 
> for 2 days I have sent test e-mails all of them with headers in the
> e-mail and attachments all screwy. then I found the culprit.
> 
> at the top of my script is:
> 
> local $\ = "\n";
> 
> now ... isn't local supposed to "modify the listed variables to be
> local to the enclosing block, file, or eval." ?

No. That's "my".

> then why when I set this variable just before some code (Mail::Sender
> or MIME::Entity) that builds the e-mail and sends it, that the e-mail
> ALWAYS comes out wrong (wrong == improper formatting, wrong headers,
> bad multipart, etc.).

Yes that's what I would expect.

> use MIME::Entity;
> 
> local $\ = "\n";
> 
> my $top = MIME::Entity->build(
> Type=> "multipart/mixed",
>   From=> "nikola_janceski\@summithq.com",
> To  =>
> '[EMAIL PROTECTED]',
> Subject => "something"
> );
> ...

> Am I just misunderstanding the use of local?

Yes.

See this:

sub foo {
print "\$x = $x\n";
}

$x = "global value";
foo();
{
local $x = "local value";
foo();
}
foo();
{
my $x = "my value";
foo();
}
foo();

Do you see? 
The "my $x = ..." "changes the value of $x" only for the block, while 
"local $x = ..." changes the value of $x UNTIL you finish the block.
That's a big difference.

What local does is this:
1) it stores the value of the variable somewhere
2) sets the variable to undef or whatever you told it to
3) installs a "handler" that'll replace the value of the variable
 with whatever local stored when the execution leaves the block.

On the other hand "my" creates a NEW variable that's not accessible 
from anywhere outside the block.

You want to read MJD's "Coping with Scoping"
http://perl.plover.com/FAQs/Namespaces.html

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: mondo makefile

2002-10-24 Thread Jenda Krynicky
From: "George" <[EMAIL PROTECTED]>
> Three reasons.
>   1. A friend asked me to help him with this because he will likely
>   have to support it and wants to trim it down. 

You are NOT supposed to modify the Makefile by hand. If you need to 
make some changes, do them in the Makefile.PL.

>   2. So he and I can
>   better understand makefiles in general and what's really not needed
>   can be omitted. 

I don't think the makefiles generated by Perl are the best examples 
for learning. The MakeMaker was designed to be portable, not easy to 
read. You could go over the Makefile and delete the targets that you 
think you do not need, but I would not want to have to do things like 
that.

You can trim it down, but I don't think there is any (semi)automated 
tool to help you with that.

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: local()! Explain, please?

2002-10-24 Thread Nikola Janceski
Then I am really confused, how can I cause the scope of $\ to extend only to
the end of the file and not into the other modules??

perldoc -f local
 local EXPR
 You really probably want to be using "my" instead,
 because "local" isn't what most people think of as
 "local".  See the Private Variables via my() entry
 in the perlsub manpage for details.

 A local modifies the listed variables to be local to
 the enclosing block, file, or eval.  If more than
 one value is listed, the list must be placed in
 parentheses.  See the Temporary Values via local()
 entry in the perlsub manpage for details, including
 issues with tied arrays and hashes.

and in my quick script:

#!yourperl
my $\ = "\n";
__END__

I get this error:

Can't use global $\ in "my" at /usr/nj/pl.pl line 4, near "my $\ "
Execution of /usr/nj/pl.pl aborted due to compilation errors.

> -Original Message-
> From: Jenda Krynicky [mailto:Jenda@;Krynicky.cz]
> Sent: Thursday, October 24, 2002 3:16 PM
> To: Beginners (E-mail)
> Subject: Re: local()! Explain, please?
> 
> 
> > at the top of my script is:
> > 
> > local $\ = "\n";
> > 
> > now ... isn't local supposed to "modify the listed variables to be
> > local to the enclosing block, file, or eval." ?
> 
> No. That's "my".
> 
> > then why when I set this variable just before some code 
> (Mail::Sender
> > or MIME::Entity) that builds the e-mail and sends it, that 
> the e-mail
> > ALWAYS comes out wrong (wrong == improper formatting, wrong headers,
> > bad multipart, etc.).
> 
> Yes that's what I would expect.
> 
> 
> > Am I just misunderstanding the use of local?
> 
> Yes.
> 
> See this:
> 
>   sub foo {
>   print "\$x = $x\n";
>   }
> 
>   $x = "global value";
>   foo();
>   {
>   local $x = "local value";
>   foo();
>   }
>   foo();
>   {
>   my $x = "my value";
>   foo();
>   }
>   foo();
> 
> Do you see? 
> The "my $x = ..." "changes the value of $x" only for the block, while 
> "local $x = ..." changes the value of $x UNTIL you finish the block.
> That's a big difference.
> 
> What local does is this:
>   1) it stores the value of the variable somewhere
>   2) sets the variable to undef or whatever you told it to
>   3) installs a "handler" that'll replace the value of 
> the variable
>with whatever local stored when the execution leaves the block.
> 
> On the other hand "my" creates a NEW variable that's not accessible 
> from anywhere outside the block.
> 
> You want to read MJD's "Coping with Scoping"
> http://perl.plover.com/FAQs/Namespaces.html
> 



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: local()! Explain, please?

2002-10-24 Thread Michael Fowler
On Thu, Oct 24, 2002 at 02:02:15PM -0400, Nikola Janceski wrote:
> local $\ = "\n";
> 
> now ... isn't local supposed to "modify the listed variables to be local to
> the enclosing block, file, or eval." ?
[snip]
> Am I just misunderstanding the use of local?

Yes, but the documentation isn't helping.  The best explanation I can give
you is http://perl.plover.com/FAQs/Namespaces.html#C_local_and_C_my_.  In
short, local squirrels away the current value of the variable, and replaces
it with undef.  The actions of local aren't reversed until the scope it was
called in is exited.

What you're seeing in your program is action at a distance, and this is the
primary reason 'my' was added, and why many of the special variables should
only be used in very limited circumstances.


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

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




RE: Large numbers

2002-10-24 Thread Goodman Kristi - kgoodm
I am running WIN2000 and perl 5.6.1



-Original Message-
From: Robert Citek [mailto:rwcitek@;alum.calberkeley.org]
Sent: Thursday, October 24, 2002 11:02 AM
To: Goodman Kristi - kgoodm
Cc: '[EMAIL PROTECTED]'
Subject: Re: Large numbers



Hello Kristi,

At 10:22 AM 10/24/2002 -0500, Goodman Kristi - kgoodm wrote:
>Does anyone know why Perl has a hard time with large numbers and sometimes
>turns them into negative numbers?  Sorry if I am not being specific enough,
>but really all I am doing is calculating the number of records in a file
and
>if it is a large number of records (lets say over a million) it will return
>a negative number for some reason.  

Could you please provide an example?  Also on what operating system are you
using perl?  What perl version ('perl -V')?

For exampe, this piece of code works just find on Cygwin and Linux:
  perl -e '$a=100 ; $a++ ; print $a, "\n" ;

You must agree that 1 + 10^14 (~100 Terabytes) is a pretty big number.  I
doubt you have a file that has that many records.

Regards,
- Robert


*

The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.


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




RE: Large numbers

2002-10-24 Thread Goodman Kristi - kgoodm
I guess it is usually several mil that produces a problem.

Here is a line of code that calculates the number of records in a file.

$recs = (-s "$outname.src") / $recl;


I am just taking the bytes of $outname.src and dividing by the record length
of the file and that returns the number of records.  95% of the time it
works fine but on some large files, it will return a negative amount of
records.



-Original Message-
From: Nigel Wetters [mailto:nigel.wetters@;rivalsdm.com]
Sent: Thursday, October 24, 2002 10:44 AM
To: Goodman Kristi - kgoodm
Cc: '[EMAIL PROTECTED]'
Subject: Re: Large numbers


On Thu, 2002-10-24 at 16:22, Goodman Kristi - kgoodm wrote:
> Does anyone know why Perl has a hard time with large numbers...
>
> ...lets say over a million...

That's not really a large number, and Perl should have no difficulty
with it. Could you provide an example of code that produces this
problem?
-- 
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]>





**
The information contained in this communication is
confidential, is intended only for the use of the recipient
named above, and may be legally privileged.
If the reader of this message is not the intended
recipient, you are hereby notified that any dissemination, 
distribution, or copying of this communication is strictly
prohibited.
If you have received this communication in error,
please re-send this communication to the sender and
delete the original message or any copy of it from your
computer system. Thank You.


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




Re: Using CPAN.pm to Install Modules

2002-10-24 Thread Randy Perkins
this would mess me up also
replace the slash with two colons

perl -MCPAN -e shell
cpan> install MIME::Lite

after i get past that hurdle
i have to be sure it passes all its tests
and when it doesnt
i have to find out why and fix it
usually in directory
/home//.cpan/build//
is more information
sometimes the tests are in a 't' directory under the main directory

good luck

randy

- Original Message - 
From: [EMAIL PROTECTED] 
To: Beginners Perl Mailing List 
Sent: Tuesday, October 22, 2002 4:48 PM
Subject: Using CPAN.pm to Install Modules


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]



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




Re: Large numbers

2002-10-24 Thread Tanton Gibbs
Can you run perl -V and send the results to the list.  It may be that you
didn't compile with USE_LARGE_FILES.  Are you using ActiveState perl?
- Original Message -
From: "Goodman Kristi - kgoodm" <[EMAIL PROTECTED]>
To: "'Robert Citek'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 12:00 PM
Subject: RE: Large numbers


> I am running WIN2000 and perl 5.6.1
>
>
>
> -Original Message-
> From: Robert Citek [mailto:rwcitek@;alum.calberkeley.org]
> Sent: Thursday, October 24, 2002 11:02 AM
> To: Goodman Kristi - kgoodm
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: Large numbers
>
>
>
> Hello Kristi,
>
> At 10:22 AM 10/24/2002 -0500, Goodman Kristi - kgoodm wrote:
> >Does anyone know why Perl has a hard time with large numbers and
sometimes
> >turns them into negative numbers?  Sorry if I am not being specific
enough,
> >but really all I am doing is calculating the number of records in a file
> and
> >if it is a large number of records (lets say over a million) it will
return
> >a negative number for some reason.
>
> Could you please provide an example?  Also on what operating system are
you
> using perl?  What perl version ('perl -V')?
>
> For exampe, this piece of code works just find on Cygwin and Linux:
>   perl -e '$a=100 ; $a++ ; print $a, "\n" ;
>
> You must agree that 1 + 10^14 (~100 Terabytes) is a pretty big number.  I
> doubt you have a file that has that many records.
>
> Regards,
> - Robert
>
>
> *
>
> The information contained in this communication is
> confidential, is intended only for the use of the recipient
> named above, and may be legally privileged.
> If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination,
> distribution, or copying of this communication is strictly
> prohibited.
> If you have received this communication in error,
> please re-send this communication to the sender and
> delete the original message or any copy of it from your
> computer system. Thank You.
>
>
> --
> 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: Use of uninitialized value at ./tablecomp.pl line 780, chunk 299

2002-10-24 Thread Michael Fowler
On Thu, Oct 24, 2002 at 10:43:50AM -0700, naveen prabhakar wrote:
> Hi,this might be a really silly question.

I might be feeding you a bunch of fish, rather than pointing you to
documentation, so we both might be silly.

 
> what values are considered as uninitialized.how can I avoid this error.

undef is considered uninitialized.  A variable's value is, by default,
undef.  You receive the warning whenever Perl has to convert undef to a
string or a number; for example, if you compare it to another value, or if
you add it, etc.

To avoid the error in general you should do one of two things:

1) Initialize your variable to something other than undef, and never
   assign undef to it.

2) Test your variable with defined before attempting to use it.

You can also turn off warnings, either globally or locally, but I would not
suggest relying on that.  The warning is a diagnostic to let you know you
haven't handled something properly, you shouldn't try to avoid it to fix the
problem.

 
> what does chunk 299 mean.the chunk number remains the same for a series of
> such error statements.I have just tried to read from a file into an array
> of records and a hash of records

The " chunk 299" part tells you that the filehandle DB2 was at chunk
299 when you received the error.  This is to help you determine if there was
a parsing error with that specific chunk.  A chunk is whatever is read by a
 operation ($foo = , while (), etc.); usually it's a
line, but you can redefine $/ (the input record seperator, normally
newline), thus it's "chunk" and not "line".

 
> Use of uninitialized value at ./tablecomp.pl line 780,  chunk 299
> 
> the line at 780 is.
> 
> if($db2array->[$i]->{$db2key} ne $raimah->{$id}->{$db2key})

Either $db2array->[$i]->{$db2key} or $raimah->{$id}->{$db2key} was
undefined.  You can know this because perl gives different warnings for the
different parts of your data structure.

For example, if $i was undefined, you would've been given the warning:

Use of uninitialized value in array element ...

If $db2key or $id was undefined you would've been given the warning:

Use of uninitialized value in hash element ...

So, by process of elimination, it must be $db2array->[$i]->{$db2key} or
$raimah->{$id}->{$db2key}.  This is all assuming you have a recent version
of Perl that does, indeed, give out these specific warnings, and that my
logic is correct.


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

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




RE: local()! Explain, please?

2002-10-24 Thread Jenda Krynicky
From: Nikola Janceski <[EMAIL PROTECTED]>

> Then I am really confused, how can I cause the scope of $\ to extend
> only to the end of the file and not into the other modules??

I'm afraid you can't.
You could (using some Tie::Handle magic) change the filehandle so 
that each print to that filehandle will add \n at the end of the 
data, but I don't think it's worth the hassle. I think it would be 
easier to define println() than this.

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: local()! Explain, please?

2002-10-24 Thread Michael Fowler
On Thu, Oct 24, 2002 at 03:24:14PM -0400, Nikola Janceski wrote:
> Then I am really confused, how can I cause the scope of $\ to extend only to
> the end of the file and not into the other modules??

You can't.  However, you might be able to confine your local version of $\
to only those operations you want.  I tried to go back to your original code
to give you an example of this, but it wasn't clear to me what exactly you
wanted affected by your version of $\, and what should've been left alone. 


> #!yourperl
>   my $\ = "\n";
> __END__
> 
> I get this error:
> 
> Can't use global $\ in "my" at /usr/nj/pl.pl line 4, near "my $\ "
> Execution of /usr/nj/pl.pl aborted due to compilation errors.

These special variables are global.  Even if you could manage to lexically
scope them they wouldn't be the same variable any more than the two $foo
variables would be with 'our $foo; my $foo;'


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

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




RE: Large numbers

2002-10-24 Thread Goodman Kristi - kgoodm
Here is the output from perl -V


Summary of my perl5 (revision 5 version 6 subversion 1) configuration:
  Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=undef use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
  Compiler:
cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
-DNO_STRICT -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
-DPERL_MSVCRT_READFIX',
optimize='-O1 -MD -DNDEBUG',
cppflags='-DWIN32'
ccversion='', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=4
alignbytes=8, usemymalloc=n, prototype=define
  Linker and Libraries:
ld='', ldflags ='-nologo -nodefaultlib -release
-libpath:"C:\Perl\lib\CORE"  -machine:x86'
libpth="C:\Perl\lib\CORE"
libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib odbccp32.lib
msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib
  Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release
-libpath:"C:\Perl\lib\CORE"  -machine:x86'


Characteristics of this binary (from libperl): 
  Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT
PERL_IMPLICIT_SYS
  Locally applied patches:
ActivePerl Build 626
  Built under MSWin32
  Compiled at May  2 2001 01:31:15
  %ENV:
PERLDB_OPTS="RemotePort=127.0.0.1:2000"
  @INC:
C:/Perl/lib
C:/Perl/site/lib
.

-Original Message-
From: Tanton Gibbs [mailto:thgibbs@;deltafarms.com]
Sent: Thursday, October 24, 2002 2:37 PM
To: Goodman Kristi - kgoodm; 'Robert Citek'
Cc: [EMAIL PROTECTED]
Subject: Re: Large numbers


Can you run perl -V and send the results to the list.  It may be that you
didn't compile with USE_LARGE_FILES.  Are you using ActiveState perl?
- Original Message -
From: "Goodman Kristi - kgoodm" <[EMAIL PROTECTED]>
To: "'Robert Citek'" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 12:00 PM
Subject: RE: Large numbers


> I am running WIN2000 and perl 5.6.1
>
>
>
> -Original Message-
> From: Robert Citek [mailto:rwcitek@;alum.calberkeley.org]
> Sent: Thursday, October 24, 2002 11:02 AM
> To: Goodman Kristi - kgoodm
> Cc: '[EMAIL PROTECTED]'
> Subject: Re: Large numbers
>
>
>
> Hello Kristi,
>
> At 10:22 AM 10/24/2002 -0500, Goodman Kristi - kgoodm wrote:
> >Does anyone know why Perl has a hard time with large numbers and
sometimes
> >turns them into negative numbers?  Sorry if I am not being specific
enough,
> >but really all I am doing is calculating the number of records in a file
> and
> >if it is a large number of records (lets say over a million) it will
return
> >a negative number for some reason.
>
> Could you please provide an example?  Also on what operating system are
you
> using perl?  What perl version ('perl -V')?
>
> For exampe, this piece of code works just find on Cygwin and Linux:
>   perl -e '$a=100 ; $a++ ; print $a, "\n" ;
>
> You must agree that 1 + 10^14 (~100 Terabytes) is a pretty big number.  I
> doubt you have a file that has that many records.
>
> Regards,
> - Robert
>
>
> *
>
> The information contained in this communication is
> confidential, is intended only for the use of the recipient
> named above, and may be legally privileged.
> If the reader of this message is not the intended
> recipient, you are hereby notified that any dissemination,
> distribution, or copying of this communication is strictly
> prohibited.
> If you have received this communication in error,
> please re-send this communication to the sender and
> delete the original message or any copy of it from your
> computer system. Thank You.
>
>
> --
> 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: Large numbers

2002-10-24 Thread Tanton Gibbs
You do not have USE_LARGE_FILE support enabled.  This could be causing the
problem.  However, it will only cause a problem for files larger than 2G.
Are the files giving you problems larger than 2G?
- Original Message -
From: "Goodman Kristi - kgoodm" <[EMAIL PROTECTED]>
To: "'Tanton Gibbs'" <[EMAIL PROTECTED]>; "'Robert Citek'"
<[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, October 24, 2002 4:24 PM
Subject: RE: Large numbers


> Here is the output from perl -V
>
>
> Summary of my perl5 (revision 5 version 6 subversion 1) configuration:
>   Platform:
> osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
> uname=''
> config_args='undef'
> hint=recommended, useposix=true, d_sigaction=undef
> usethreads=undef use5005threads=undef useithreads=define
> usemultiplicity=define
> useperlio=undef d_sfio=undef uselargefiles=undef usesocks=undef
> use64bitint=undef use64bitall=undef uselongdouble=undef
>   Compiler:
> cc='cl', ccflags ='-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE
> -DNO_STRICT -DHAVE_DES_FCRYPT  -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS
> -DPERL_MSVCRT_READFIX',
> optimize='-O1 -MD -DNDEBUG',
> cppflags='-DWIN32'
> ccversion='', gccversion='', gccosandvers=''
> intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
> d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10
> ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
> lseeksize=4
> alignbytes=8, usemymalloc=n, prototype=define
>   Linker and Libraries:
> ld='', ldflags ='-nologo -nodefaultlib -release
> -libpath:"C:\Perl\lib\CORE"  -machine:x86'
> libpth="C:\Perl\lib\CORE"
> libs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
> comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
> uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib
odbccp32.lib
> msvcrt.lib
> perllibs=  oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
> comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib  netapi32.lib
> uuid.lib wsock32.lib mpr.lib winmm.lib  version.lib odbc32.lib
odbccp32.lib
> msvcrt.lib
> libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl56.lib
>   Dynamic Linking:
> dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
> cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release
> -libpath:"C:\Perl\lib\CORE"  -machine:x86'
>
>
> Characteristics of this binary (from libperl):
>   Compile-time options: MULTIPLICITY USE_ITHREADS PERL_IMPLICIT_CONTEXT
> PERL_IMPLICIT_SYS
>   Locally applied patches:
>   ActivePerl Build 626
>   Built under MSWin32
>   Compiled at May  2 2001 01:31:15
>   %ENV:
> PERLDB_OPTS="RemotePort=127.0.0.1:2000"
>   @INC:
> C:/Perl/lib
> C:/Perl/site/lib
> .
>
> -Original Message-
> From: Tanton Gibbs [mailto:thgibbs@;deltafarms.com]
> Sent: Thursday, October 24, 2002 2:37 PM
> To: Goodman Kristi - kgoodm; 'Robert Citek'
> Cc: [EMAIL PROTECTED]
> Subject: Re: Large numbers
>
>
> Can you run perl -V and send the results to the list.  It may be that you
> didn't compile with USE_LARGE_FILES.  Are you using ActiveState perl?
> - Original Message -
> From: "Goodman Kristi - kgoodm" <[EMAIL PROTECTED]>
> To: "'Robert Citek'" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Thursday, October 24, 2002 12:00 PM
> Subject: RE: Large numbers
>
>
> > I am running WIN2000 and perl 5.6.1
> >
> >
> >
> > -Original Message-
> > From: Robert Citek [mailto:rwcitek@;alum.calberkeley.org]
> > Sent: Thursday, October 24, 2002 11:02 AM
> > To: Goodman Kristi - kgoodm
> > Cc: '[EMAIL PROTECTED]'
> > Subject: Re: Large numbers
> >
> >
> >
> > Hello Kristi,
> >
> > At 10:22 AM 10/24/2002 -0500, Goodman Kristi - kgoodm wrote:
> > >Does anyone know why Perl has a hard time with large numbers and
> sometimes
> > >turns them into negative numbers?  Sorry if I am not being specific
> enough,
> > >but really all I am doing is calculating the number of records in a
file
> > and
> > >if it is a large number of records (lets say over a million) it will
> return
> > >a negative number for some reason.
> >
> > Could you please provide an example?  Also on what operating system are
> you
> > using perl?  What perl version ('perl -V')?
> >
> > For exampe, this piece of code works just find on Cygwin and Linux:
> >   perl -e '$a=100 ; $a++ ; print $a, "\n" ;
> >
> > You must agree that 1 + 10^14 (~100 Terabytes) is a pretty big number.
I
> > doubt you have a file that has that many records.
> >
> > Regards,
> > - Robert
> >
> >
> > *
> >
> > The information contained in this communication is
> > confidential, is intended only for the use of the recipient
> > named above, and may be legally privileged.
> > If the reader of this message is not the intended
> > recipient, you are hereby notified that any dissemination,

DBIx::HTMLView module

2002-10-24 Thread bioinfo Gu

Hi, I am install DBIx::HTMLView module on perl-5.6.1

when I 'make test':

PERL_DL_NONLAZY=1 /usr/bin/perl5.6.1 -Iblib/arch -Iblib/lib 
-I/compbio/programs/perl-5.6.1/lib/5.6.1/alpha-dec_osf -I/co
mpbio/programs/perl-5.6.1/lib/5.6.1 test.pl
Compilation 1..1
ok 1

NOTE: Those test are done against a database named HTMLViewTester on
a local mysql server. If that db don't excists DBI->connect will fail
with a 'Unknown database' error. Se config.pm for instructions on how
to create such a db.

Database set up and construction
ok 1
Sending drop table commands to the database, this will generate error
reports if they do not exist, don't worry about that.

Clean db tests
not ok 1

Basic database functions
ok 1
ok 2
ok 3
ok 4
ok 5
not ok 6
ok 7
ok 8
ok 9
ok 10
ok 11
not ok 12
ok 13
ok 14
ok 15

Order Flds
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6

Relations
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
not ok 9

Tree tests
ok 1
ok 2
ok 3
ok 4

view_fmt tests
not ok 1
ok 2
not ok 3
ok 4

CGIView interface tests
No cgi defined! at blib/lib/DBIx/HTMLView/CGIView.pm line 166
DBIx::HTMLView::CGIView::cgi('DBIx::HTMLView::CGIReqEdit=HASH(0x1405b6f68)') 
called at blib/lib/DBIx/HTMLView/CG
IView.pm line 192

DBIx::HTMLView::CGIView::tab_name('DBIx::HTMLView::CGIReqEdit=HASH(0x1405b6f68)') 
called at blib/lib/DBIx/HTMLVi
ew/CGIView.pm line 74
DBIx::HTMLView::CGIView::new('DBIx::HTMLView::CGIReqEdit', 'View.cgi', 
'DBIx::HTMLView::mysqlDB=HASH(0x14046da90
)', undef) called at blib/lib/DBIx/HTMLView/CGIReqEdit.pm line 63
DBIx::HTMLView::CGIReqEdit::new('DBIx::HTMLView::CGIReqEdit', 'View.cgi', 
'DBIx::HTMLView::Post=HASH(0x140629930
)') called at test.pl line 489
*** Exit 2
Stop.


Does anybody have any idea? thanks a lot in advance.

 

Grace



-
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site


RE: Perl on a Palm?

2002-10-24 Thread Schmitz, AlexX
Except there is nothing there, so sorry! Ignore me...

-
Alex Schmitz
Intel Customer Support EMEA
[EMAIL PROTECTED]
01793 40 4266
-
> The information in this email (and any attachments) is intended only for the person 
>or entity to which it is addressed and may contain confidential and/or privileged 
>material. If you are not the named addressee you must not use, disclose, distribute, 
>copy, print or rely on the content of this email and should destroy it immediately. 
>Please note that we cannot guarantee that this message or any attachment is virus 
>free or has not been intercepted and amended. While every reasonable precaution has 
>been taken to minimize this risk, we cannot accept liability for any damage, which 
>you sustain as a result of software viruses. You should therefore carry out your own 
>virus checks before opening any attachments.
> 
> 


> -Original Message-
> From: Schmitz, AlexX 
> Sent: 24 October 2002 15:23
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: Perl on a Palm?
> 
> 
> Perl for Palm??? Here you go:
> http://sourceforge.net/projects/palmperl/
> 
> 
> Regards,
> 
> --
> ---
> Alex Schmitz
> --
> ---
> > 
> 
> 
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:shawn_milochik@;godivachoc.com]
> > Sent: 24 October 2002 14:59
> > To: [EMAIL PROTECTED]
> > Subject: Perl on a Palm?
> > 
> > 
> > Does anyone know if it's possible to execute Perl scripts on 
> > the Palm OS?
> > Does anyone here do any Palm OS programming of any kind?  
> > What free toolkit
> > is available for it?
> > 
> > Shawn
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> **
> > 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]
> 

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




RE: Perl on a Palm?

2002-10-24 Thread Schmitz, AlexX
Perl for Palm??? Here you go:
http://sourceforge.net/projects/palmperl/


Regards,

-
Alex Schmitz
-
> 


> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:shawn_milochik@;godivachoc.com]
> Sent: 24 October 2002 14:59
> To: [EMAIL PROTECTED]
> Subject: Perl on a Palm?
> 
> 
> Does anyone know if it's possible to execute Perl scripts on 
> the Palm OS?
> Does anyone here do any Palm OS programming of any kind?  
> What free toolkit
> is available for it?
> 
> Shawn
> 
> 
> 
> 
> 
> 
> **
> 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]




Perl on a Palm?

2002-10-24 Thread shawn_milochik
Does anyone know if it's possible to execute Perl scripts on the Palm OS?
Does anyone here do any Palm OS programming of any kind?  What free toolkit
is available for it?

Shawn






**
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]




detecting "visually similar" strings

2002-10-24 Thread David Garamond
hi,

i want to develop a perl module to determine whether two strings are too 
"visually similar". for example, "ella" (double lowercase ell) and 
"e11a" (double 1 digit). so this is kind of Soundex but for the eyes. 
this checking is usable for avoiding "typo attacks" (like in the case of 
an attacker registering an email account/username on a forum and sending 
mails/postings to make people think he's someone else). i'm also 
wondering whether there's a more scalable algorithm to check against 
thousands of existing strings.

is there already a perl module on CPAN to do this? from a couple of 
quick searching, it doesn't seem to be. there's only String::Similarity, 
which is not exactly what i'm looking for.

PS: i'm sorry if [EMAIL PROTECTED] is not the appropriate place for 
asking these kinds of questions, and in that case could someone please 
direct me to the right one, but so far this list has been the best, 
healthiest environment for perl support questions.

--
dave


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



Re: Mail Problem. Can Anyone Help Me?

2002-10-24 Thread Martin Hudec
-BEGIN PGP SIGNED MESSAGE-
Hash: MD5

Hello Bootscat,

well it looks like you are missing Mail::Sender library...use for
example CPAN to find it

and.$smtp_server = "localhost.com"; I just want to ask you...are
you using this domain? because it looks to me like it is from source
code example and that localhost.com should be changed to your SMTP
server

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


Thursday, October 24, 2002, 3:46:30 PM, you wrote:

B> I'm setting up a mysqls email list.

B> In the config file it has this varables
B> # Path to SendMail
B> $mailprog = "/usr/sbin/sendmail";
B> $smtp_server = "localhost.com";

B> When I try to login I get this:

B> Can't locate Mail/Sender.pm in @INC (@INC contains: /usr/lib/perl5/5.6.1/i686-linux 
/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i686-linux 
/usr/lib/perl5/site_perl/5.6.1
B> /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at admin.cgi line 1134.
B> BEGIN failed--compilation aborted at admin.cgi line 1134.

B> This is the line in the script it refers to:

B>use Mail::Sender;
B>ref ($sender = new Mail::Sender({from => $admin_email,smtp => $smtp_server})) or 
die "$Mail::Sender::Error\n";
B>while ($pointer = $sth->fetchrow_hashref) {
B>  $new_contact = $pointer->{"Contact"};
B>  (ref ($sender->MailMsg({to =>$new_contact, subject => $msubject, msg => 
$mmessage}))
B>   and print ""
B>  )
B>  or die "$Mail::Sender::Error\n";
B>}
B>$sth->finish;
B>$dbh->disconnect;

B> Can someone tell me how to correct this problem?

B> Thanks and God Bless
B> Dan

-BEGIN PGP SIGNATURE-
Version: 2.6

iQIVAwUAPbf2pEPT2lg9k7IvAQHEiw/9FOwUBJfGou9/n+pgHQ7p5uus37290/v4
HZOCNFSF3a53Ie7WDiZ/0xhIjdHBHl2hnvoPNt875Ze0yCeXYwEqmzTTQ7jgbmfc
v6/MUjEDGs2o9ORSLuW1FKY87nWzNHi5fPcLArCVoc9NeOky23iNBut87boOcoY5
KTdZjVj/EVjEqaNOwKJzhPHYaQPEzUCjzFhn8g0RGDEQgAkItCGU8g9zvECrvnDI
cLFlhH88sfkDJyrpTCfM5V6vV2aInTwjpnZA0RD7OKtZkEoeX5OOLy+xuh5TgHjQ
8RCeuD0hICuE84iqaMhFt+CjAPNdtRqQAnLjYRZ/exb0UNor4vt8GZp/s3XNvKxd
jVhHwounu4a1CiMy4U1I8yxWS4es0wgftG/ogMexY691+U5hWcpoh+ZfdLpCwUZC
eUWEfjaOR3lTGeDWPg+312HMemEKn/Yscm5NsGu6vfOZLud0xDDhZnJ+L2aO+vEf
u09fXPTDKrwTjSoOmClG/lBePo7dvjmKjHog4NGfbMyO4FgHyl8RjMCd4W5Es7i5
yE8HEt5F0mn5TlpRdzu1bdaicJ6LU+6cQLDhNRn19uAxjePoGOLL9vIqnROpzYzz
KBSA3HefT9yMFpd9PEXIwCLK59ZJj3Hn8CBsrVx/Y0fzbD+MtOesoSvciXDMqi/M
9XyqT5/SBYk=
=j5/4
-END PGP SIGNATURE-


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




Mail Problem. Can Anyone Help Me?

2002-10-24 Thread Bootscat
I'm setting up a mysqls email list. 

In the config file it has this varables
# Path to SendMail
$mailprog = "/usr/sbin/sendmail";
$smtp_server = "localhost.com";

When I try to login I get this:

Can't locate Mail/Sender.pm in @INC (@INC contains: /usr/lib/perl5/5.6.1/i686-linux 
/usr/lib/perl5/5.6.1 /usr/lib/perl5/site_perl/5.6.1/i686-linux 
/usr/lib/perl5/site_perl/5.6.1 /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl 
.) at admin.cgi line 1134.
BEGIN failed--compilation aborted at admin.cgi line 1134.

This is the line in the script it refers to:

   use Mail::Sender;
   ref ($sender = new Mail::Sender({from => $admin_email,smtp => $smtp_server})) or 
die "$Mail::Sender::Error\n";
   while ($pointer = $sth->fetchrow_hashref) {
 $new_contact = $pointer->{"Contact"};
 (ref ($sender->MailMsg({to =>$new_contact, subject => $msubject, msg => $mmessage}))
  and print ""
 )
 or die "$Mail::Sender::Error\n";
   }
   $sth->finish;
   $dbh->disconnect; 

Can someone tell me how to correct this problem?

Thanks and God Bless
Dan


Re: regex ( i suck at them)

2002-10-24 Thread Nigel Wetters
On Thu, 2002-10-24 at 13:04, I wrote:
>   $news =~ s/^\[\*\] (.*)$/$1/;

sorry, this is probably better
  $news =~ s/^\[\*\] //;


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




Re: regex ( i suck at them)

2002-10-24 Thread Robin Cragg

Hi,

if all you want to do is remove the '[*]' why not do:

s/^\[\*\]\s+//;


R

At 16:03 23/10/2002 -0800, Andres L. Figari wrote:

Hello,

I am having toruble getting my regex to work >:^(

The file I'm parsing for headlines looks like this

[*] headline 1
[*] headline 2
etc ...

here is my perl attempt at stripping out the [*] part of each line.

open (NEWS,$news_file) || die "cannot open news.txt: newsfile = $news_file";

while (defined ($news = )) {
chomp $news;
$news =~ s/^(\[\*\]) + ([^W.*])/$2/;
print "$news";
}
close (NEWS);

Thing is my regex thingo is not working, somehow it still prints [*] with
each headline :(

Also, the [*]  is used by an already working php script, so I prefer not to
alter the format of the text file.  Any ideas, suggestions, tips, or advice?

Many thanks in advanced :)

Regards,

Andres


--
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: regex ( i suck at them)

2002-10-24 Thread Nigel Wetters
On Thu, 2002-10-24 at 01:03, Andres L. Figari wrote:
> [*] headline 1
> [*] headline 2

ok

> $news =~ s/^(\[\*\]) + ([^W.*])/$2/;

This won't match, and thus no substitution will happen.

try:
  $news =~ s/^\[\*\] (.*)$/$1/;

-- 
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]




Re: Job completion from queue under Windows '98

2002-10-24 Thread Jenda Krynicky
From:   "Rajendra Babu, Praveen" 
<[EMAIL PROTECTED]>
> * 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 .log 

Where is that specific directory? On the mechine that processed the 
job? Or is there a common directory somewhere? How do you know who 
submited the job?

Is the log file created as soon as the job is started being processed 
and is beging modified during the processing or is it created after 
the job completes. I mean ... is it safe to assume that if there is 
that file the job has completed?

You could run a script there that would test for new files in this 
directory, this script could run anywhere.

Another option would be to "watch" that directory with 
Win32::ChangeNotify, but the computer where is this directory and 
where the script runs must be WinNT/2k/XP.

In either case you


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

Well ... how do you know then that someone has submited something?
If you could force them to submit the jobs using your script that 
would do something and then run resub. Otherwise the only chance you 
have to find out someone has submited anything is to run the bqview.


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]




Weekly list FAQ posting

2002-10-24 Thread casey
NAME
beginners-faq - FAQ for the beginners mailing list

1 -  Administriva
  1.1 - I'm not subscribed - how do I subscribe?

Send mail to <[EMAIL PROTECTED]>

You can also specify your subscription email address by sending email to
(assuming [EMAIL PROTECTED] is your email address):

<[EMAIL PROTECTED]>.

  1.2 -  How do I unsubscribe?

Now, why would you want to do that? Send mail to
<[EMAIL PROTECTED]>, and wait for a response. Once you
reply to the response, you'll be unsubscribed. If that doesn't work,
find the email address which you are subscribed from and send an email
like the following (let's assume your email is [EMAIL PROTECTED]):

<[EMAIL PROTECTED]>

  1.3 - There is too much traffic on this list. Is there a digest?

Yes. To subscribe to the digest version of this list send an email to:

<[EMAIL PROTECTED]>

To unsubscribe from the digest, send an email to:

<[EMAIL PROTECTED]>

This is a high traffic list (100+ messages per day), so please subscribe
in the way which is best for you.

  1.4 - Is there an archive on the web?

Yes, there is. It is located at:

http://archive.develooper.com/beginners%40perl.org/

  1.5 - How can I get this FAQ?

This document will be emailed to the list once a week, and will be
available online in the archives, and at http://learn.perl.org/

  1.6 - I don't see something in the FAQ, how can I make a suggestion?

Send an email to <[EMAIL PROTECTED]> with your suggestion.

  1.7 - Is there a supporting website for this list?

Yes, there is. It is located at:

http://beginners.perl.org/

  1.8 - Who owns this list?  Who do I complain to?

Casey West owns the beginners list. You can contact him at
[EMAIL PROTECTED]

  1.9 - Who currently maintains the FAQ?

Kevin Meltzer, who can be reached at the email address (for FAQ
suggestions only) in question 1.6

  1.10 - Who will maintain peace and flow on the list?

Casey West, Kevin Meltzer and Ask Bjoern Hansen currently carry large,
yet padded, clue-sticks to maintain peace and order on the list. If you
are privately emailed by one of these folks for flaming, being
off-topic, etc... please listen to what they say. If you see a message
sent to the list by one of these people saying that a thread is closed,
do not continue to post to the list on that thread! If you do, you will
not only meet face to face with a XQJ-37 nuclear powered pansexual
roto-plooker, but you may also be taken off of the list. These people
simply want to make sure the list stays topical, and above-all, useful
to Perl beginners.

  1.11 - When was this FAQ last updated?

Sept 07, 2001

2 -  Questions about the 'beginners' list.
  2.1 - What is the list for?

A list for beginning Perl programmers to ask questions in a friendly
atmosphere.

  2.2 - What is this list _not_ for?

* SPAM
* Homework
* Solicitation
* Things that aren't Perl related
* Monkeys
* Monkeys solicitating homework on non-Perl related SPAM.
  2.3 - Are there any rules?

Yes. As with most communities, there are rules. Not many, and ones that
shouldn't need to be mentioned, but they are.

* Be nice
* No flaming
* Have fun
  2.4 - What topics are allowed on this list?

Basically, if it has to do with Perl, then it is allowed. You can ask
CGI, networking, syntax, style, etc... types of questions. If your
question has nothing at all to do with Perl, it will likely be ignored.
If it has anything to do with Perl, it will likely be answered.

  2.5 - I want to help, what should I do?

Subscribe to the list! If you see a question which you can give an
idiomatic and Good answer to, answer away! If you do not know the
answer, wait for someone to answer, and learn a little.

  2.6 - Is there anything I should keep in mind while answering?

We don't want to see 'RTFM'. That isn't very helpful. Instead, guide the
beginner to the place in the FM they should R :)

Please do not quote the documentation unless you have something to add
to it. It is better to direct someone to the documentation so they
hopefully will read documentation above and beyond that which answers
their question. It also helps teach them how to use the documentation.

  2.7 - I don't want to post a question if it is in an FAQ. Where should I
look first?

Look in the FAQ! Get acquainted with the 'perldoc' utility, and use it.
It can save everyone time if you look in the Perl FAQs first, instead of
having a list of people refer you to the Perl FAQs :) You can learn
about 'perldoc' by typing:

"perldoc perldoc"

At your command prompt. You can also view documentation online at:

http://www.perldoc.com and http://www.perl.com

  2.8 Is this a high traffic list?

YES! You have been warned! If you don't want to get ~100 emails per day
from this

Configuration files

2002-10-24 Thread vinai AR
Title: Message



Hi 
all,
    
We have a library and a configuration file for that library. the 
inputs to the library will be populated in the configuration file and the 
configuration file name will be sent to the library. Now we need to 
call the library twice with different sets of configuration files. We feel 
that 
recreating the 
configuration file twice for calling the library with different input 
values, as overhead. We would like to know
1. Is there any functions in 
perl like GetProfileString( ) and SetProfileString( )  SDK functions, which 
are  used to access the windows INI files.
    
2. We were also suggested to use hash list instead of configuration file to give 
input to the
library. Is this is 
efficient or any other efficient method is there.
 
Any ideas, 
suggestions, tips, or advice would be of great 
help.
thanks in 
advance.
 
rgds,
vinai
**Disclaimer

Information contained in this E-MAIL being proprietary to Wipro Limited is 
'privileged' and 'confidential' and intended for use only by the individual
 or entity to which it is addressed. You are notified that any use, copying 
or dissemination of the information contained in the E-MAIL in any manner 
whatsoever is strictly prohibited.

***


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


Text Menu Telnet App, on Windoze

2002-10-24 Thread sangoma
Hi,

Not sure if 'Text Menu Telnet App' is the correct nomenclature, hopefully
you know what I mean, one of those old style apps that supported VT clients.

I'm very much a newbie and have strung something together but I'm not too
happy with the way I'm doing menus, or writing to the clients screens.

Can anyone point me in the right direction?

tia

k



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




regex ( i suck at them)

2002-10-24 Thread Andres L. Figari
Hello,

I am having toruble getting my regex to work >:^(

The file I'm parsing for headlines looks like this

[*] headline 1
[*] headline 2
etc ...

here is my perl attempt at stripping out the [*] part of each line.

open (NEWS,$news_file) || die "cannot open news.txt: newsfile = $news_file";

while (defined ($news = )) {
chomp $news;
$news =~ s/^(\[\*\]) + ([^W.*])/$2/;
print "$news";
}
close (NEWS);

Thing is my regex thingo is not working, somehow it still prints [*] with
each headline :(

Also, the [*]  is used by an already working php script, so I prefer not to
alter the format of the text file.  Any ideas, suggestions, tips, or advice?

Many thanks in advanced :)

Regards,

Andres


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




Email Script Help

2002-10-24 Thread Bill O'Reilly
Hi,

I am trying to setup a script on a linux (RedHat 7.3) box that when someone
copies a file to a particular folder it would trigger an email being sent to
a user. There are multiple folders I would like to add this script to that
all I would need to do would be to change the subject line of the email.

Does anyone have any suggestions on where I can look to write something like
this or ideas on writing it? Is this possible?

Thanks much,

Bill O'Reilly



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




Re: learning...

2002-10-24 Thread dan
there's also www.cgi101.com .. it's part of a book really, but the first 6
chapters, which are extracts from the book, are really handy, and that's
where i started to learn perl, and made me the programmer i am today.

dan

"Jean-Marie De Crozals" <[EMAIL PROTECTED]> wrote in message
news:mail-675C0F.16591523102002@;nntp.perl.org...
> 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: Splitting A large data file

2002-10-24 Thread Jenda Krynicky
> How to combine it back after split???
> 
> Regards 
> j@veed

copy /B file1.dat + file2.dat + file3.dat + file4.dat + file5.dat 
file.dat

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: mondo makefile

2002-10-24 Thread Jenda Krynicky
> Can anyone show me how to get this makefile.pl to generate a smaller
> makefile?  This is for the CodeGenSystem extension to perl.

Why?

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: Using CPAN.pm to Install Modules

2002-10-24 Thread Jenda Krynicky
From: [EMAIL PROTECTED]
> 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"

Strange.

Maybe it is a setup issue. I tried
get MIME::Lite
and it worked fine.

Maybe you should try a different mirror.
I am using
cpan> o conf urllist
  
ftp://sunsite.mff.cuni.cz/MIRRORS/ftp.funet.fi/pub/languages/perl/CPAN
/
  ftp://ftp.fi.muni.cz/pub/perl/
  ftp://ftp.demon.co.uk/pub/CPAN/
  ftp://sunsite.doc.ic.ac.uk/packages/CPAN/
but I don't think you'll want to use those ;-)

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]




split files and join

2002-10-24 Thread Javeed SAR
Hi all,

i have  big files, i want to split it and do a ftp to other sites, at the
other site i should be able to join them and execute them, any of you are
doing this type of thing, can anyone help me??

TIA



mondo makefile

2002-10-24 Thread George Szynal



Can anyone show me how to get this makefile.pl to 
generate a smaller makefile?  
This is for the CodeGenSystem extension to 
perl.
 


Makefile
Description: Binary data


Makefile.PL
Description: Binary data
-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


RE: How to rename file with a serial extension for backup?

2002-10-24 Thread Satheesh Ramamoorthy
Though it executes as intended, there is a warning message as "Name
"main::FH" used only once: possible typo at fren.pl line 5.", what does that
mean?

Thanks,
_S_

-Original Message-
From: Mark Goland [mailto:mgoland@;optonline.net]
Sent: Thursday, October 24, 2002 12:08 PM
To: [EMAIL PROTECTED]
Subject: Re: How to rename file with a serial extension for backup?


You can probebly make it work with open, I am nto sure how to. This will
work...
#!/usr/local/bin/perl -w
use Fcntl; # for perm constants
use Errno; # for errno constants

unless ( sysopen ($FH,"test.txt",O_WRONLY|O_CREAT|O_EXCL, 0744) ){

 if( $!{EEXIST} ){
  print "file exists \n ";
  # rename it here
 }
 }



- Original Message -
From: "chris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 23, 2002 9:32 PM
Subject: How to rename file with a serial extension for backup?


> 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]
>
>



-- 
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 rename file with a serial extension for backup?

2002-10-24 Thread John W. Krahn
Chris wrote:
> 
> 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


You mean something like this:

my ( $file, $ext );
do  {
$file = sprintf 'test.%03d', ++$ext;
} while -e $file;

open OUT, "> $file" or die "Cannot open $file: $!";



John
-- 
use Perl;
program
fulfillment

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