RE: While loop on a file handle

2003-08-06 Thread David Wall
--On Wednesday, August 06, 2003 2:50 PM +0200 Jenda Krynicky <[EMAIL PROTECTED]> wrote: From: "Morrison, Trevor (Trevor)" <[EMAIL PROTECTED]> What I am trying to do is to process a file that has say 1000 orders in it all pretty much of the same format. I want to open up the file, and then usin

Re: Help with Unlink please

2003-08-06 Thread Steve Grazzini
On Wed, Aug 06, 2003 at 11:49:20PM -0400, perlwannabe wrote: > I have made the script as simple as possible and cannot get > unlink to work. > > unlink ("c:\testdir\*030977*.*") || die "unlink failed: $!"; You'd need to expand the wildcards yourself: my $pat = 'c:\testdir\*030977*.*'; forea

Re: how do i list the methods connected to a object?

2003-08-06 Thread Rob Dixon
Jenda Krynicky wrote: > > Guess what methods does this object support ;-) > > package Len; > > sub new { > my $self; > bless \$self, 'Len'; > } > > sub AUTOLOAD { > $AUTOLOAD =~ s/^.*:://; > return length($AUTOLOAD); > } Nice one Jenda! But I couldn't find it on CPAN :-/ Rob -- To unsubscrib

Re: Eval for module

2003-08-06 Thread Jeff 'japhy' Pinyan
On Aug 6, Dan Muey said: >Whenever I've tried to do: > > eval { use module; }; > if($@) . > >It always fails and I can't trap it it to , say, try a different module >if it's not found or otherwise do anythign, (like tell a web browser user >they need a certain module for it to work: Tha

RE: Archive::Zip funnny return status

2003-08-06 Thread Dan Muey
> I think your pattern match will only catch a literal AZ_OK, > not the constant. And I'm not sure, but AZ_OK might evaluate > to 0. At least I think I remember having trouble with that > module because it returns 0 on success, and I kept testing > for TRUE/FALSE based on the return status.

Re: entring variables in Hash

2003-08-06 Thread John W. Krahn
Sachin Hegde wrote: > > Hi, Hello, > I want to add an array as an hash entry e.g. > %HOA = {one=>"@arr"}; > > And you're right John I do get the warning > > Reference found where even-sized list expected at line n. > > Now how do I remove it? Like I said in my previous message, use parenthe

Getting string of several lines from <>

2003-08-06 Thread Trina Espinoza
Wondering if someone can help bail me out. I would like to have the data of <> as one long string. Right now I have @list = <> because if I do $scalar= <> it only captures one line of my file. However, what I really need is to capture the data as one long string. Can anyone deliver a swift answ

Re: http paths in @INC

2003-08-06 Thread Bob Showalter
Gupta, Sharad wrote: > Hi All, > > Can i have something like "http:://Somepath" > > in @INC. No. It is possible to write code allowing simple modules to be fetched via HTTP and compiled. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: SV: List::Util / arrays

2003-08-06 Thread Jeff 'japhy' Pinyan
On Aug 6, Jakob Kofoed said: >use List::Util qw(first max min); You don't use first(), so don't both exporting it. >open IN, "<", "num.txt"; > >while ($xx = ) { > chomp $xx; > my @xx = split (/\s+/, $xx); > push @col1, $xx[0]; Those three lines could just be: push @col1,

testing

2003-08-06 Thread Michael Adrian
test --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.505 / Virus Database: 302 - Release Date: 7/30/2003

Re: problem changing filenames

2003-08-06 Thread Jeff 'japhy' Pinyan
On Aug 5, David Smith said: >On Tue, 2003-08-05 at 09:37, Jeff 'japhy' Pinyan wrote: >> You didn't show us how you tried running the program. I'll show you first >> how to change the +'s to _'s. But I need to know WHICH numbers should be >> removed from the filename. All of them (except for the

Re: how to do paging of records

2003-08-06 Thread Daniela Silva - Absoluta.net
Hi, try using : select * from yourtable where rownum < 50; Only first 50 registers should be retrieved. You could do for each page: where rownum > page*nro_reg_per_page and rownum < page * nro_reg_per_page + nro_reg_per_page Or something like that, this is the idea. - Origina

suid problem

2003-08-06 Thread Gary Stainburn
Hi folks, I've got an AIX 4.2 box running our company management system and I've got a problem. when a user logs in (e.g. gary) the /etc/profile runs a small C program which is setuid live:livetp which in turn runs our COBOL based app. In the app I call a perl script which takes a plain text f

Re: Deleting entries in a Hash

2003-08-06 Thread John W. Krahn
Sachin Hegde wrote: > > Hi all, Hello, > How do I efficiently delete all the entries in a Hash of arrays. > suppose I have > %HOA = { one => [ "a","b","c"], > two => [ "x","y","z"], > }; It looks like you don't have warnings enabled otherwise you would get this war

RE: Archive::Zip funnny return status

2003-08-06 Thread Tim Johnson
If you do a "perldoc Archive::Zip" (I would print out a hard copy of the result, it's pretty long), you should get all of the error codes, methods, etc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 06, 2003 9:44 AM To: Dan Muey Cc: [EMAIL P

Perl script to set a password

2003-08-06 Thread Harter, Douglas
To preface this, let me say that I am a system administrator responsible for creating and modifying User accounts on a Unix system. Is it possible to make a Perl script to change passwords using the passwd command without having to get and answer those prompts??? I have tried opening a process fi

Re:Input Box

2003-08-06 Thread Pinku Bhatnagar
hi, There is a text entry widget in perk/tk. It is exactly similar to the input box of VB. While creating the entry widget you associate a scalar variable to it. You can then use this variable to get/set the text or value in the entry widget. HTH Pinku Bhatnagar -- To unsubscribe, e-mail:

Re: entring variables in Hash

2003-08-06 Thread Jeff 'japhy' Pinyan
On Aug 6, Sachin Hegde said: >%HOA = {one=>"@arr"}; > >And you're right John I do get the warning >Reference found where even-sized list expected at line n. >Now how do I remove it? You are using CURLY braces: {...}. You want to be using PARENTHESES when you define a hash. my %hash = ( key

Re: how do i list the methods connected to a object?

2003-08-06 Thread Jenda Krynicky
From: [EMAIL PROTECTED] (Martin A. Hansen) > a bricklayer! so i have found a module which is fulfilling my needs, > but i find it very annoying that i cannot simple dump all the > functions connected to a certain object. now im advised to read the > module documentation (which can be poor) of this

RE: While loop on a file handle

2003-08-06 Thread Perry, Alan
On Tuesday, August 05, 2003 12:13, Trevor Morrison wrote: > >Hi, > >I am trying to step through each line of a file that contains orders that >were place through a internet shopping cart. I have this code: > > open(ORDER,$order) or die "Error opening \"$order\": $OS_ERROR\n"; > >print "HI\n"; > wh

RE: Large file line by line

2003-08-06 Thread Dan Muey
> Dan Muey wrote: > > Howdt list. > > > > I've never had to work with really big files before( I'm > used to tiny > > ones you can slurp in at once) and now I have to process a > 180MB text > > file line by line and was wondering the most efficient method to do > > so form within a script not

How to replace a text in a file

2003-08-06 Thread Vinay Thombre
Hi, I am novice to Perl and learning very basic things. I want to replace a text in a file with new text. I want to do it programatically. How can I do that? I do not want to use Perl command line argumanets. Can anyone help? TIA, Vinay -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additio

Deleting entries in a Hash

2003-08-06 Thread Sachin Hegde
Hi all, How do I efficiently delete all the entries in a Hash of arrays. suppose I have %HOA = { one => [ "a","b","c"], two => [ "x","y","z"], }; I want %HOA = {}; cheers, Sachin _ Attention NRIs! Send money

While loop on a file handle

2003-08-06 Thread Trevor Morrison
Hi, I am trying to step through each line of a file that contains orders that were place through a internet shopping cart. I have this code: open(ORDER,$order) or die "Error opening \"$order\": $OS_ERROR\n"; print "HI\n"; while (defined($_ = )) { print "Hi there \n"; I am trying to test

RE: %EXPORT_TAGS question

2003-08-06 Thread Dan Muey
> From: "Dan Muey" <[EMAIL PROTECTED]> > > perldoc Exporter says: > > > > %EXPORT_TAGS = (T1 => [qw(A1 A2 B1 B2)], T2 => [qw(A1 A2 B3 B4)]); > > > > So I am wondering if I can do something like this wilst filling in > > tags: > > > > %EXPORT_TAGS = ( > > T1 => [EMAIL PROTECTED],qw(A1 A2 B1 B2)]

Re: how do i list the methods connected to a object?

2003-08-06 Thread Peter Scott
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Ovid) writes: >--- "Martin A. Hansen" <[EMAIL PROTECTED]> wrote: >> i wonder how i can list all the methods availible from a given object? > >The simple answer: You can't. Welcome to Perl. > >The long answer: there are a variety of strategies y

Re: how do i list the methods connected to a object?

2003-08-06 Thread Martin A. Hansen
On Tue, Aug 05, 2003 at 08:18:24PM +0100, Rob Dixon wrote: > > "Ovid" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > --- Peter Scott <[EMAIL PROTECTED]> wrote: > > > >The problem here is that it will not print inherited or AUTOLOADed methods. > > > [snip] > > > > > > So traverse t

RE: :Oracle not executing stored procedure properly...

2003-08-06 Thread Coello, David
hi everyone! im having a problem, i want to display 10 records at a time per page in a cgi page, im using oracle 8 i have try'd a few things without any luck, HELP! i could get all my records fine but i cant get the paging to work. david -Original Message- From: Hamish Whittal [mailto:[EM

RE: Large file line by line

2003-08-06 Thread Dan Muey
> > Howdt list. > > > > I've never had to work with really big files before( I'm used > > to tiny ones you can slurp in at once) and now I have to > > process a 180MB text file line by line and was wondering the > > most efficient method to do so form within a script not via > > coommand line.