Re: Search for a file pattern in a directory tree recursively

2004-03-26 Thread John W. Krahn
Rajesh Dorairajan wrote: > > Hello All, Hello, > I went through all the documentation and previous mail posts about > File::Find and finally decided I needed some help. > > I've a directory structure I need to parse. The directory contains > subdirectories with filenames such as > > full094382

File writing

2004-03-26 Thread Joseph Ruffino
Hi, I'm trying to create file using data enterd from a webpage. In my previous program, I used the format command to write a recors. Is there another way to do that I can't find? -- Joseph A. Ruffino Automated Systems Assistant 270 N. Grove Ave Elgin, Il 60120 Phone: (847) 742-2411 ext 5986 F

RE: Streaming a file to a remote user

2004-03-26 Thread Traeder, Philipp
> I'm trying to figure out a way to stream a file to a remote > user, and be able to determine that the download completed, > so I can delete the file being streamed. I may be missing an > obvious way to do this, so I'm hoping you all can help me out. > > Here's the sequence of events I'm afte

Re: Home made mail news search tool, and folded header lines

2004-03-26 Thread Randy W. Sims
Harry Putnam wrote: I'm writing a home boy mail/news search tool and wondered if there is a cononical way to handle folded or indented header lines. There are modules to help read mail headers, but if you want something simple you can modify the following example: #!/usr/bin/perl use strict; use

sorting AoA

2004-03-26 Thread N, Guruguhan \(GEAE, Foreign National, EACOE\)
Hi , I have an array that is build like this foreach $i ( 0 .. @array1-1) { foreach $j ( 0 .. @array2-1) { $array3[$i][$j] = $array2[$j]; } } The array3 has "m" rows and "n" columns of data. This code is written by some one else and I am trying to get the st

Re: sorting AoA

2004-03-26 Thread Rob Dixon
Guruguhan N wrote: > > I have an array that is build like this > foreach $i ( 0 .. @array1-1) { > foreach $j ( 0 .. @array2-1) { > $array3[$i][$j] = $array2[$j]; > } > } > The array3 has "m" rows and "n" columns of data. > > This code is written by some one else and I am trying to get the statistic

Re: sorting AoA

2004-03-26 Thread John W. Krahn
Guruguhan N wrote: > > Hi , Hello, > I have an array that is build like this > foreach $i ( 0 .. @array1-1) { > foreach $j ( 0 .. @array2-1) { > $array3[$i][$j] = $array2[$j]; > } > } You can use an array slice to do that: @array3[ 0 .. $#array1 ] = map [ @array2 ], 0 .

Re: Make a nice buffer?

2004-03-26 Thread Gary Stainburn
On Thursday 25 March 2004 10:30 pm, David Busby wrote: > List, > I want to make a buffer for my application to write log data to. I've > created a fifo (`mkfifo /tmp/buf`) Then I made my PERL script that > reads from /tmp/buf. Other programs open and write to /tmp/buf but when > they close the

Re: Home made mail news search tool, and folded header lines

2004-03-26 Thread Harry Putnam
"Randy W. Sims" <[EMAIL PROTECTED]> writes: > Harry Putnam wrote: >> I'm writing a home boy mail/news search tool and wondered if there is >> a cononical way to handle folded or indented header lines. > > There are modules to help read mail headers, but if you want something > simple you can modif

Problem with objects...hashes and arrays

2004-03-26 Thread Schell, Holger
Hi, please can somebody help me and show me the way to access the single attributes for my object...? I do not have any clue how to handle the array in a hash and so on. If u want to ask me why I am using it, also I cannot handle itdo not ask...now really I want to use this structure cause it

RE: Streaming a file to a remote user

2004-03-26 Thread Wiggins d Anconia
> > I'm trying to figure out a way to stream a file to a remote > > user, and be able to determine that the download completed, > > so I can delete the file being streamed. I may be missing an > > obvious way to do this, so I'm hoping you all can help me out. > > > > Here's the sequence of e

Re: Problem with objects...hashes and arrays

2004-03-26 Thread Wiggins d Anconia
> > Hi, > please can somebody help me and show me the way to access the single attributes for my object...? > I do not have any clue how to handle the array in a hash and so on. > If u want to ask me why I am using it, also I cannot handle itdo not ask...now really I want to use this structure

Re: Problem with objects...hashes and arrays

2004-03-26 Thread James Edward Gray II
On Mar 26, 2004, at 9:20 AM, Schell, Holger wrote: Hi, Howdy. please can somebody help me and show me the way to access the single attributes for my object...? I'll try. I do not have any clue how to handle the array in a hash and so on. You my see a lot of benefit looking over some Perl Object

Re: Test::Harness weird failure

2004-03-26 Thread Paul Johnson
On Wed, Mar 24, 2004 at 09:41:32AM +0200, Claude wrote: > Actually, I got it wrong from the beginning: although there may be > ways go araound that, you _need_ the Test::More or Test::Simple from > the beginning. Test::Harness design is based on their use. I did not get > that right away. If nece

Re: Playing with Unicode

2004-03-26 Thread James Edward Gray II
On Mar 25, 2004, at 6:54 PM, Randy W. Sims wrote: On 3/25/2004 5:42 PM, James Edward Gray II wrote: Why when I run this one-liner: perl -e 'print "\x{2660}\n"' do I see this: Wide character in print at -e line 1. I'm assuming that's a warning, since I still get the expected output, but why am I g

why warn 'prints'?

2004-03-26 Thread Jayakumar Rajagopal
Warn behaves like print, unless I add a space afer "\n". why ? $ perl warn " Not able to create portfolio_list \n"; #no space after \n __END__; Not able to create portfolio_list $ perl warn " Not able to create portfolio_list \n "; __END__; Not able to

Re: why warn 'prints'?

2004-03-26 Thread James Edward Gray II
On Mar 26, 2004, at 10:44 AM, Jayakumar Rajagopal wrote: Warn behaves like print, unless I add a space afer "\n". why ? If warn ends in a \n, it prints the message as is. If it doesn't, it appends the line number from the source. Hope this helps. James -- To unsubscribe, e-mail: [EMAIL PROTEC

cr + tar

2004-03-26 Thread Olivier Wirz
Hello, On Windows NT works following script to create a tar file and then transfer it on a AIX machine. # # Create tar file # my $tar = Archive::Tar -> new; $tar -> add_files(@files_to_tar); $tar -> write ($opt_tar_file); # # Start FTP-Transfer (to be done with variables) # my

Re: Home made mail news search tool, and folded header lines

2004-03-26 Thread Randy W. Sims
Harry Putnam wrote: "Randy W. Sims" <[EMAIL PROTECTED]> writes: Harry Putnam wrote: I'm writing a home boy mail/news search tool and wondered if there is a cononical way to handle folded or indented header lines. There are modules to help read mail headers, but if you want something simple you c

RE: why warn 'prints'?

2004-03-26 Thread Jayakumar Rajagopal
James, Yes. you are right. But my Q was, why such behaviour ? What is the idea behind such implementaiton? thanks, Jay -Original Message- From: James Edward Gray II [mailto:[EMAIL PROTECTED] Sent: Friday, March 26, 2004 12:07 PM To: Jayakumar Rajagopal Cc: beginners Beginners Subject:

Re: why warn 'prints'?

2004-03-26 Thread James Edward Gray II
On Mar 26, 2004, at 12:01 PM, Jayakumar Rajagopal wrote: James, Yes. you are right. But my Q was, why such behaviour ? What is the idea behind such implementaiton? It's a handy debugging tool. Leave off the \n and you can see right where the problems are. James -- To unsubscribe, e-mail:

Re: warn ?!

2004-03-26 Thread Alok Bhatt
Hi Jai, A similar question was posted just yesterday. The difference between between the two lines (37 and 57) is that the second line contains a space after "\n". As pointed earlier, you can take take it as a debugging option (ie remove \n or add a space and perl prints out the line no. too)

RE: sort

2004-03-26 Thread Bob Showalter
[EMAIL PROTECTED] wrote: > any modules out there that can sort things such as.. BB10, > BB1100,BB11. I want it to be in this order. BB10,BB11,BB1100. Erm, that's lexical order. $ perl -le 'print for sort @ARGV' BB10 BB1100 BB11 BB10 BB11 BB1100 Am I missing something? -- To unsubscribe, e-m

RE: sort

2004-03-26 Thread ewalker
-Original Message- From: Bob Showalter [mailto:[EMAIL PROTECTED] Sent: Friday, March 26, 2004 12:19 PM To: ewalker; [EMAIL PROTECTED] Subject: RE: sort [EMAIL PROTECTED] wrote: > any modules out there that can sort things such as.. BB10, > BB1100,BB11. I want it to be in this order. BB

RE: Using Perl Expect.pm

2004-03-26 Thread Bob Showalter
TapasranjanMohapatra wrote: > Hi, > Can someone tell me how to handle the vt100 sequences using expect > module of perl. I have used the same sequences while using TCL > Expect. It works fine. But I don't understand what is the problem > while I try doing the same thing using Perl Expect. If my T

Re: sort

2004-03-26 Thread Jenda Krynicky
From: [EMAIL PROTECTED] > On Thu, 25 Mar 2004 [EMAIL PROTECTED] wrote: > > > any modules out there that can sort things such as.. BB10, > > BB1100,BB11. I want it to be in this order. BB10,BB11,BB1100. > > yeah, if you have 5.8 you can use mergesort from the sorts module > > use strict; use wa

Re: cr + tar

2004-03-26 Thread WC -Sx- Jones
Olivier Wirz wrote: On AIX, after tar -xvf, I have the problem. Is it a way to avoid the ? Thank you. Why would you want to change a WinNT data source? Is the target (at a later date) NT or Unix? If Unix then change the Line Ending BEFORE you tar it OR just tar it on the AIX side... There are

Re: cr + tar

2004-03-26 Thread Olivier Wirz
Thank you for your answer, I will try that. The target is effectively AIX - the developers work on nt but the software runs on AIX Olivier > Olivier Wirz wrote: > > > On AIX, after tar -xvf, I have the problem. Is it a way to avoid > the > > ? Thank you. > > Why would you want to change a WinN

Re: sorting AoA

2004-03-26 Thread John W. Krahn
Guruguhan N wrote: > > Hi John, Hello, > Thanks for the quick help. I have resolved the problem > with your suggestions. But now I am facing a new problem. Actually > the goal is to get the statistics for each of the data column stored > in a file (FilterMC_3bar_data.out). This file

Re: why warn 'prints'?

2004-03-26 Thread WilliamGunther
warn is a debugging function that prints a message to the STDERR (Not print, which can print to anything and prints to STDOUT by default) and appends your message with a line number and such. It's just like die, that doesn't exit. Another difference is print uses $_ by default, and warn uses $@

Re: sorting AoA

2004-03-26 Thread WC -Sx- Jones
if (-s $output_file) { You shouldn't use file test operators to determine whether or nor to open files as there is no guarantee that the test will be valid by the time you open the file. File tests should be done AFTER you obtain a RW lock. This is *supposed* to prevent other system processe

Re: sorting AoA

2004-03-26 Thread James Edward Gray II
On Mar 26, 2004, at 6:06 PM, WC -Sx- Jones wrote: if (-s $output_file) { You shouldn't use file test operators to determine whether or nor to open files as there is no guarantee that the test will be valid by the time you open the file. File tests should be done AFTER you obtain a RW lock.

Re: sorting AoA

2004-03-26 Thread WC -Sx- Jones
James Edward Gray II wrote: if (-s $output_file) { :) There are other reasons to test for a file size prior to opening it :) Why open a data file if it is zero length when you expect data? -- _Sx_ http://youve-reached-the.endoftheinternet.org/ _ perldoc -qa.a | perl -lpe '($_)=m("(.*)")'

CGI and special characters

2004-03-26 Thread Howard Fuchs
Hi all: Here is my problem. I have a script which processes input from a textarea which may have 'special characters' in it like ‘ or ’ etc. Unfortunately what I am getting back are these ‘ or ’ respectively. Script snippet start-- use CGI qw/:standard/; print "Content-type

Re: File writing

2004-03-26 Thread Wiggins d'Anconia
Joseph Ruffino wrote: Hi, I'm trying to create file using data enterd from a webpage. In my previous program, I used the format command to write a recors. Is there another way to do that I can't find? How do you mean? Is it a specific type of file? I assume (hope) you don't mean: perldoc

Re: warn ?!

2004-03-26 Thread R. Joseph Newton
Alok Bhatt wrote: > > Hi Jai, Hi Alok, Please don't top-post. Instead, follow the material you are responding to, and trim extraneous matter. > > > But the waring message output line 37 is > > different(just behaves as print) from same kind of > > message at line 57. Any suggestions pleas

Re: Home made mail news search tool, and folded header lines

2004-03-26 Thread R. Joseph Newton
Harry Putnam wrote: > I'm writing a home boy mail/news search tool and wondered if there is > a cononical way to handle folded or indented header lines. > > An example would be that I wanted to run a series of regex against each > line of input (While in headers) grabing the matches into an array

Re: Home made mail news search tool, and folded header lines

2004-03-26 Thread Randy W. Sims
On 3/27/2004 2:23 AM, R. Joseph Newton wrote: These lines should probably be going into a hash, keyed to the portion of the line before the colon. Don't forget that some header fields can appear more than once. Regards, Randy. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Curved edge in Menu

2004-03-26 Thread jaffer
Dear Friends,I created the attached sub menu in CGI using Tables.In that fig, Client Tools is the Main Menu and when I clicked on it the sub menu appears as above. Now I want the edges to be curved as follows. Is it possible to curve the edges as show above. I have created the sub menu usin

Re: Curved edge in Menu

2004-03-26 Thread Oliver Schnarchendorf
On Fri, 26 Mar 2004 11:04:45 +0530, jaffer wrote: > I created the attached sub menu in CGI using Tables. > > In that fig, Client Tools is the Main Menu and when I clicked on it the sub > menu appears as above. Mallik, I am sorry to tell you that you have chosen the wrong forum for your qu