Re: system function

2002-11-18 Thread Mark Goland
> system (('tunctl',-u,$buf) | ('awk',print,$2) ); you can also try this system ("tunctl,-u,$buf | awk,print,$2 " ); - Original Message - From: "Timothy Johnson" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, November 18, 2002 2:40 AM Subject: RE: system f

FILTER

2002-11-18 Thread Javeed SAR
Hi, Can i filter incoming e-mails. I am using exchange server (outlook) on win2k. For example if i have send a mail with an attachement to a particular id say [EMAIL PROTECTED] , i want the perl scipt to see that it move the attachement to local drive of my system. Is it possible.?? Regards

Big hash question.

2002-11-18 Thread mark
Hi, I am trying to make hash of delivery zones that allows me to maintain a record of a zone for every postal code based on the first three digits of each zip. Being new to perl I have a few questions about the logical approach. Should I list zones as the name component with zips as a list of va

RE: unlink in ActiveState Perl 5.6.0

2002-11-18 Thread Beau E. Cox
Hi - This is avoiding your question about unlink (sorry), but you may want to use a CPAN module to get temp files. I have used (and am very happy with) File::Temp. This module does the tedious work of getting a temp file name and cleans up after itself. Aloha => Beau. PS: Unlink has worked fine

Re: unlink in ActiveState Perl 5.6.0

2002-11-18 Thread Anshul Chhabra
I am using Build 623. My code is given below. Basically, for processing I need to create some temp files. After I use them, I want to delete the file. But the unlink does not work. require 'AddHeaderToBody.pl'; require 'AddFooterToBody.pl'; $argvLen = @ARGV ; $inputDir = $ARGV[0] ; $outputDir

RE: eval help needed.

2002-11-18 Thread Steve
Well what I want to do is backup my Eudora mailboxes, and I have that part working, but I wanna automate it so that every time I close Eudora the files get copied. A suggestion was that I could wrap the call to Eudora in an eval and just call Eudora from the Perl Script. At 07:23 PM 11/18/02

RE: unlink in ActiveState Perl 5.6.0

2002-11-18 Thread Timothy Johnson
What build are you using? You should probably be using ActivePerl 5.6.1 build 633. I've used unlink on Win32 with no problems. Perhaps you can post your code? -Original Message- From: Anshul Chhabra [mailto:[EMAIL PROTECTED]] Sent: Monday, November 18, 2002 5:18 PM To: beginner perl Su

unlink in ActiveState Perl 5.6.0

2002-11-18 Thread Anshul Chhabra
Hi all Has anybody used unlink in ActiveState Perl 5.6.0 (on Windows)? It does not seem to be working for me. thanks in advance Anshul -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: references and printing

2002-11-18 Thread John W. Krahn
Todd W wrote: > > John W. Krahn wrote: > > Paul wrote: > > > >>--- Julien Motch <[EMAIL PROTECTED]> wrote: > >> > >>>#The next line printsd the reference why ? > >>>print("the host which you are connecteed to is $pop->Host()\n"); # > >>>Mail::POP3Client=HASH(0x8153a8c)->Host() > >> > >>Inside the

RE: eval help needed.

2002-11-18 Thread Peter Kappus
I've never played with it, but I think what you need is the perl win32 OLE libaray...basically, it gives you VBScript-like access to win32 objects and applications via perl! check it out: http://aspn.activestate.com/ASPN/Perl/Products/ActivePerl/site/lib/Win32/OLE ..html I'm not sure what you're

Re: references and printing

2002-11-18 Thread Todd W
John W. Krahn wrote: Paul wrote: --- Julien Motch <[EMAIL PROTECTED]> wrote: #The next line printsd the reference why ? print("the host which you are connecteed to is $pop->Host()\n"); # Mail::POP3Client=HASH(0x8153a8c)->Host() Inside the quotes, the -> operator is taken as printable chara

eval help needed.

2002-11-18 Thread Steve
I have this code running under Windows 98 using ActiveState: The file copy is working okay. What isn't working is the eval system call. Eudora is never executed and run, BUT the copy always happens. How can I get Eudora to be called? Is it possible at all? use File::Copy; use File::DosGlob q

Re: System/Exec/Fork ... Help!

2002-11-18 Thread Alan Cameron
On 18 Nov 2002 15:21:26 -0500, Jason Frisvold <[EMAIL PROTECTED]> wrote: [snip] > I can't see to figure out how to spawn a new process, return the pid, > and be able to monitor this new process on my own ... The general form would be something like: my $pid = fork(); if ($pid) { # I am

Re: Flatfile database sorting in Perl

2002-11-18 Thread John W. Krahn
Gavin Laking wrote: > > One of my scripts uses a home-brewed flatfile database to store > information, and I've run up against a problem when I wish to sort > columns of data. > > An example of the database file: > (items,fruit,date) > > 16,apples,20021118-172

RE: Flatfile database sorting in Perl

2002-11-18 Thread Wagner, David --- Senior Programmer Analyst --- WGO
ach my $MyData (sort {$a->[1] <=> $b->[1] || $a->[2] <=> $b->[2]} map{[$_, /^\d+,[^,]+,(\d+)\-(\d+)/]} @dbfile) { printf "%20s: %-s\n", $MyData->[1] . '-' . $MyData->[2], $MyData->[0]; } Output: Sort numerically:

Flatfile database sorting in Perl

2002-11-18 Thread Gavin Laking
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi folks, One of my scripts uses a home-brewed flatfile database to store information, and I've run up against a problem when I wish to sort columns of data. An example of the database file: (items,fruit,date) 16,apples,20021118-1725 22,ba

Re: Use of Search::Dict

2002-11-18 Thread Peter Scott
In article <000f01c28d8e$ed4e4f80$[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Tin-Shan Chau) writes: >--Boundary_(ID_G2riuUEo9lO985lfAtLnbg) >Content-type: text/plain; charset=iso-8859-1 >Content-transfer-encoding: 7BIT > >Can anyone point me to an example of how to use the above module? use

RE: sorting Numeric OR Character data

2002-11-18 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Maybe one of the higher gurus might know of something, but if the data can be interweaved(ie, the key can be 1, 2, 3 and ab, dc, ed), then without looking at the data first or keeping some kind of counter, it would be from my perspective rough to do. Wags ;) -Original Message- Fro

RE: sorting Numeric OR Character data

2002-11-18 Thread Balint, Jess
> If you want to see the data, then you would need to explain > what you want. > Sorry if I was not clear. I would like to know if there is a block equivalent to { $a <=> $b } AND { $a cmp $b } at the same time. If I use the cmp style, my numbers get sort asciibetically and if I use the <=> I ca

System/Exec/Fork ... Help!

2002-11-18 Thread Jason Frisvold
I'm writing a monitoring system (Yes, still... Finally got the go-ahead to do this) and my design calls for a central "Smart" Daemon that spawns and monitors the lesser Daemons that do the actual monitoring. My problem is that I'm not sure how to go about this. >From what I understand, fork actu

RE: sorting Numeric OR Character data

2002-11-18 Thread Wagner, David --- Senior Programmer Analyst --- WGO
If it is not numeric, what do you want to do? If you want to bypass, then could do something like: my %MyData = qw( 1 10 2 15 d 9 10 5); foreach my $MyKey (sort { $a <=> $b} grep(/^\d+$/, keys %MyData) ) { printf "%5d: %-s\n", $MyKey, $MyData{$MyKey}; } Output: 1: 10 2: 15

Re: hash

2002-11-18 Thread Jeff 'japhy' Pinyan
On Nov 10, SATAR VAFAPOOR said: >When I run the following code(with any hash), I get a contiuous stream of >output. The presence of the array in the loop causes the contiuous stream >of output. When the array is commented out an output is generated. Why >does the presence of the array cause a cont

Re: Population of variables in hash values...

2002-11-18 Thread Jeff 'japhy' Pinyan
On Nov 7, Tim Yohn said: >Is there an easy way to have variables in the value of a hash that are >not populated until the value of the hash is used... for example: You could use my DynScalar module (found on CPAN): use DynScalar; my $domain; my %hash = ( offline => dynamic { "$domain

Re: Problem with Mail::MboxParser

2002-11-18 Thread Jan Gruber
Hi ! > in the above case line 31 is > my $mb = Mail::MboxParser->new("(\*STDIN)", decode => 'HEADER'); my $mb = Mail::MboxParser->new("\*STDIN", decode => 'HEADER'); should work fine (untested). HTH, Jan -- cat /dev/world | perl -e "while (<>) {(/(^.*? \?) 42 \!/) && (print $1)}" errors->(c)

sorting Numeric OR Character data

2002-11-18 Thread Balint, Jess
Hello all. I have a small subfunction with a "for sort keys %hash" construct in it. In my sort, I want to have { $a <=> $b } (numberic) sorting, but I get errors when character data is entered. Is there anyway to tell numberic vs character without looping through keys looking for m/\D/? Thanks. je

RE: can't load XML::Parser::PerlSAX

2002-11-18 Thread Beau E. Cox
Hi - If you go to Randy Kobes search site on cpan.org, you will see the following in XLM::DOM-1.14: Download / quickinstall XML-DOM-1.41.tar.gz : A perl module for building DOM Level 1 compliant document structures Size: 116.288 kB Last modified: Oct 19, 2002 README CPAN-testers results for XML

can't load XML::Parser::PerlSAX

2002-11-18 Thread Sorin Marti
Hi all I downloaded the XML Parser 2.31 from CPAN and installed it. Now I want to install XML-DOM-1.41 but I get following error Warning: prerequisite XML::Parser::PerlSAX failed to load: Can't locate XML/Parser/PerlSAX.pm Do I have to install something else before XML-DOM? Is PerlSAX not in

RE: Hi all, question about caracter detection

2002-11-18 Thread Sudarshan Raghavan
On Mon, 18 Nov 2002, Beau E. Cox wrote: > Hi - > > This will 'strip' all but a-zA-Z0-9: > > #!/usr/bin/perl > > use strict; > use warnings; > > my $STRING = "kjsh234Sd\nki"; > > $STRING =~ s/[^a-zA-Z0-9]//sg; > > print "$STRING\n"; > > the ~ makes the character class negat

RE: Hi all, question about caracter detection

2002-11-18 Thread Beau E. Cox
Hi - This will 'strip' all but a-zA-Z0-9: #!/usr/bin/perl use strict; use warnings; my $STRING = "kjsh234Sd\nki"; $STRING =~ s/[^a-zA-Z0-9]//sg; print "$STRING\n"; the ~ makes the character class negative, the s makes the regex examine new lines, and g means global.

Hi all, question about caracter detection

2002-11-18 Thread Miguel Angelo
Hi All, Thankx for reading this. I have a very newbie question... i'm working on a CGI and i want only to permit some caracters by the user... imagine my $STRING = "kjsh234Sd\nki"; # now i want to check if there is any invalid caracter # in this case a-z ; A-Z and 0-9 there for /[a-zA-Z0-9]/

Problem with Mail::MboxParser

2002-11-18 Thread Nandita Shenvi
Hallo All, I am new in perl and will be grarefull for any help. my perl script is as follows: #!/usr/bin/perl -w use lib "/home/shenvi/share/man/man3"; use IO; use Mail::Internet; use MIME::Tool; use Mail::MboxParser::Mail; use Mail::MboxParser; #USE OF Mail::MboxParser my $mb = Mai

Re: Data Access

2002-11-18 Thread Tom Allison
Paul wrote: --- Tom Allison <[EMAIL PROTECTED]> wrote: My first guess is to use "tie" to access a file of type DB_File. The number of records is small <1000 but the record structure is going to be either a hash of hashes, hash of arrays, or similar. One possible solution depends on your data

mail

2002-11-18 Thread Javeed SAR
Hi All, i get mails to a particular id in outlook. In perl i want to know how to move this attachments to do a particular activity is it possible. Regards j

RE: Trouble with Term::Readkey

2002-11-18 Thread Beau E. Cox
Hi - I downloaded and compiled Term::ReadKey (perl makefile.pl, nmake, nmake test, nmake install) on my win32 machine using ActivePerl 5.6.1 (633). No problems. Configure.pm in INCLUDED with Term::ReadKey. Maybe the PMD file (PPM) is incomplete. Do you have a compiler? If so, try building it your

Trouble with Term::Readkey

2002-11-18 Thread Tin-Shan Chau
I was trying to use the Term::ReadKey module as follows: use Term::ReadKey; ReadMode ('noecho'); $password = ReadLine(0); but got the following: Can't locate Configure.pm in @INC (@INC contains: n: