Looping

2002-10-13 Thread Octavian Rasnita
Hello all, I want to create a 2 levels hash and to loop using the second level key. I want to have something like: $list{$member}{$email} = $name; This line gives me errors meaning that it is not a correct code. I want to have a hash with more lists of members. For each member I want to have

Re: Looping

2002-10-13 Thread Randal L. Schwartz
Octavian == Octavian Rasnita [EMAIL PROTECTED] writes: Octavian I've tried with: Octavian foreach my $email (keys %list{'list_number1'}) { Octavian Octavian } Nearly. It's keys %{$list{'list_number1'}}. print Just another Perl hacker, -- Randal L. Schwartz - Stonehenge Consulting

Help with pipes

2002-10-13 Thread David Gerler
I have successfully pipe a print statement to gpg. My problem is coming in when I try to get it back out via a pipe. Can anyone tell me, is it possible to send data to a another program and the output back with out writing it to a file? This is my code to pipe it to gpg: sub scramble { my

Re: extra space in column (obvious answer but I can't find it)

2002-10-13 Thread Elias Assmann
On Sun, 13 Oct 2002, K Pfeiffer wrote: @words = STDIN; snip I expect @words to look like: qw# aaa\n bbb\n ccc\n # but when I print the list I get: I bet they actually do look like that. aaa bbb ccc Let me guess: you printed them like print @words; -- right? When you interpolate an

extra space in column (obvious answer but I can't find it)

2002-10-13 Thread K Pfeiffer
Hi Perl Gang, While doing one of the very basic exercises out of the beginning of Learning Perl I'm stuck: #!/usr/bin/perl -w use strict; my @words; print Enter a list of words, one on each line (CTRL-D when complete): \n; @words = STDIN; I'm intentionally not chomping the words. I expect

Split

2002-10-13 Thread Joseph Ruffino
Hi, Hopefully someone here can help me. I'm reading in a text file, and setting it to an array, and I want ot split that array in 3 variable, but I kepp coming up with, 'uninitiated value in contatenation (.) or string and line ... Here is the code: #!/user/bin/perl -w use strict; my

Re: Is this correct? print syntax

2002-10-13 Thread Peter Scott
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Jeff 'Japhy' Pinyan) writes: if (condition) { print FILEHANDLE list, of, stuff; next; } I rarely do that. Unless the body of the block is going to be enormous, I do it without the block. However, I think print(FOO @list) looks

help with pipes

2002-10-13 Thread David Gerler
I have successfully piped a print statement to gpg. My problem is coming in when I try to get it back out via a pipe. Can anyone tell me, is it possible to send data to a another program and the output back with out writing it to a file? I want to change the method of piping because of some

RE: Split

2002-10-13 Thread Wagner, David --- Senior Programmer Analyst --- WGO
Seeing what your data looks like would be very helpful. You say it is a text file which would imply carrirage returns, but no where do you disable the record separator so I don't believe you are reading all the data into your array. You do a foreach putting the data into

Re: Using Perl to write to an Access 97 database (*.mdb)

2002-10-13 Thread Peter Scott
In article 005c01c27168$5c6c15c0$0924fea9@spy, [EMAIL PROTECTED] (Josimar Nunes De Oliveira) writes: I´m a beginner with perl and I need to find the DBI.pm module for Win32. Does anybody know where I could find it? C:\ ppm PPM install DBI -- Peter Scott http://www.perldebugged.com -- To

Re: Is this correct? print syntax

2002-10-13 Thread Peter Scott
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Michael Fowler) writes: On Fri, Oct 11, 2002 at 01:50:53PM -0500, James Edward Gray II wrote: It's the indirect method call syntax, as far as I understand. It looks like it, but it isn't. See http:[EMAIL PROTECTED]/msg33969.html for a recent

Re: Split

2002-10-13 Thread John W. Krahn
Joseph Ruffino wrote: Hi, Hello, Hopefully someone here can help me. I'm reading in a text file, and setting it to an array, and I want ot split that array in 3 variable, but I kepp coming up with, 'uninitiated value in contatenation (.) or string and line ... Here is the code:

Re: Is this correct? print syntax

2002-10-13 Thread Jeff 'japhy' Pinyan
On Oct 11, Michael Fowler said: if (condition) { print FILEHANDLE list, of, stuff; next; } I agree. It's much more readable. I rarely do that. Unless the body of the block is going to be enormous, I do it without the block. However, I think print(FOO @list) looks really odd,

Re: Split

2002-10-13 Thread dan
Hi, Hi. Hopefully someone here can help me. I'm reading in a text file, and setting it to an array, and I want ot split that array in 3 variable, but I kepp coming up with, 'uninitiated value in contatenation (.) or string and line ... What line? Here is the code: Try this: __ START

RE: switch

2002-10-13 Thread nkuipers
You are doing your matching wrong. The only time you can refrain from using the binding operator =~ is when it would be binding the $_ variable. In your case, you are binding against $Ans. Incidentally, I think you can rewrite this: while( ( $Remainder = ($P_length%$CYLLENGTH) ) != 0 ){

Reset Passwords

2002-10-13 Thread Akens, Anthony
I need something that will allow people who do not know the root password to reset passwords on a DG/UX system (that is using shadow passwords). Basically what I'm wanting to do is write something that will be used as a specific user, so when you log on as that user it asks what account you

Re: switch

2002-10-13 Thread Mark Goland
Ok guys, SomeHow I got lost in this mess, and I think I might need more help. The values inside my switch are not properly calculated , and when I try to round down it go's into the default statment. Can you please look what I cam up with again and see where I am going wrong. #!/usr/bin/perl -w

Help with STDIN

2002-10-13 Thread Jeremy Bulmer
Hi, I need a little bit of help. I think I'm just doing something small that is wrong. For some reason when I try to use the method form to post and the user hits submit and it starts processing the form the script hangs on the line $forminfo = STDIN; ... Any ideas? Am I doing something

Re: very confused - chdir not working

2002-10-13 Thread Michael Fowler
On Fri, Oct 11, 2002 at 04:40:30PM +0100, mike wrote: ../build.pl /root/cvs/esound # this the output of $dir3 / cannot change No such file or directory at ./build.pl line 13, BLD_LIST line 55. this is ls in same directory, as you can see esound is there I don't have any context for what

Re: extra space in column (obvious answer but I can't find it)

2002-10-13 Thread K Pfeiffer
Elias Assmann writes: [...] Let me guess: you printed them like print @words; -- right? When you interpolate an array in double quotes, a space is inserted between elements. Try it this: [...] Ja, das war es! (Thanks!) -- Kevin Pfeiffer [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL

Help with 'use'

2002-10-13 Thread Tin-Shan Chau
I have a module as follows: package Test; require Exporter; our ISA = qw(Exporter); our EXPORT = qw(print_name print_test); sub print_test() { print test\n; } sub print_name() { my $file = shift; print $file\n; } When I tried to run the following: use Test; print_test(); It worked

Re: help with pipes

2002-10-13 Thread Steve Grazzini
David Gerler [EMAIL PROTECTED] wrote: I have successfully piped a print statement to gpg. My problem is coming in when I try to get it back out via a pipe. Can anyone tell me, is it possible to send data to a another program and the output back with out writing it to a file? Try the

RE: Help with 'use'

2002-10-13 Thread Timothy Johnson
I'm not completely sure, but here are a couple of things I am noticing: 1) The last line of your module should be a 1 on it's own line. 2) When you declare a sub, don't put the parentheses. Try changing the line 'sub print_test(){' to 'sub print_test{'. It's possible that Perl thinks you're

Re: Help with 'use'

2002-10-13 Thread Steve Grazzini
Tin-Shan Chau [EMAIL PROTECTED] wrote: I have a module as follows: package Test; require Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(print_name print_test); sub print_test() { print test\n; } sub print_name() { my $file = shift; print $file\n; } When I tried to

Re: Help with STDIN

2002-10-13 Thread Jeff 'japhy' Pinyan
On Oct 13, Jeremy Bulmer said: I need a little bit of help. I think I'm just doing something small that is wrong. For some reason when I try to use the method form to post and the user hits submit and it starts processing the form the script hangs on the line $forminfo = STDIN; ... Any

Re: help with pipes

2002-10-13 Thread John W. Krahn
David Gerler wrote: I have successfully piped a print statement to gpg. My problem is coming in when I try to get it back out via a pipe. Can anyone tell me, is it possible to send data to a another program and the output back with out writing it to a file? I want to change the method of

selective use of file content

2002-10-13 Thread keren
Hi, I have a set of functions in a file, which I want to use in my code. there is also some floating code in that file (code that is written in the file body with no functions or classes). is there a way I can use the functions in the file without running the floating code (the floating code

Hashes

2002-10-13 Thread Johnstone, Colin
Gidday from Downunder, Im writing the script to read the the contetns of a text file into a hash, the text file has two records [EMAIL PROTECTED]|html [EMAIL PROTECTED]|txt My script is below open IN, $mailinglist; while( my $record = IN ){ @data = split( /\|/, $record);

RE: Hashes

2002-10-13 Thread Johnstone, Colin
Hi All, Yes silly me, I found the problem the second record replaced the first as the key was the same. Thank You Colin Johnstone Website Project Officer Corporate Website Unit Public Affairs Directorate ph 9561 8643 -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: selective use of file content

2002-10-13 Thread Wiggins d'Anconia
Don't. :-) Floating code I take to mean globals, generally this is poor design in a library. If the code that floats is used by the functions then pass the function the values, or encapsulate (there's that OOP word) somehow. If its code specific to a particular function then embed it in the

Re: module installation

2002-10-13 Thread Wiggins d'Anconia
Try posting the full text of the errors. That will better enable someone to help, along with your current version of Perl, the system (OS, processor), and the particular module you are trying to install. http://danconia.org [EMAIL PROTECTED] wrote: I have been trying to install a variety of

Re: Hashes

2002-10-13 Thread John W. Krahn
Colin Johnstone wrote: Gidday from Downunder, Hello, Im writing the script to read the the contetns of a text file into a hash, the text file has two records [EMAIL PROTECTED]|html [EMAIL PROTECTED]|txt Hash keys have to be unique so the key [EMAIL PROTECTED] can either have the value

Strange Errors

2002-10-13 Thread James Edward Gray II
Howdy: I don't want to fill this message with all three modules of my code, so I'll try some general questions to see if I can get the help I need. Okay, I'm basically building a Multiplexed Non-Blocking IO Telnet Server. Earlier today I was having bug trouble, so I threw in a few extra

Remove from mailing list

2002-10-13 Thread norishaam
Hi, Could someone please remove me from the mailing list. Thank you -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

array

2002-10-13 Thread Javeed SAR
Hi All, i want to get the last part in an array help from the following output: M:\jav_test\train\final\cs1.txt i.e: help must have cs1.txt TIA

RE: array

2002-10-13 Thread Timothy Johnson
Check out the File::Basename module. It comes standard. -Original Message- From: Javeed SAR [mailto:[EMAIL PROTECTED]] Sent: Sunday, October 13, 2002 8:08 PM To: [EMAIL PROTECTED] Subject: array Hi All, i want to get the last part in an array @help from the following output:

RE: array

2002-10-13 Thread Griggs Rob
You could use: $var = 'M:\jav_test\train\final\cs1.txt'; @array = split(/\\/,$var); $last = $array[$#array]; print $last\n; OR $var =~ /^.+\\(.+)$/; print $1\n; Both print cs1.txt Rob -Original Message- From: Javeed SAR [mailto:[EMAIL PROTECTED]] Sent: 14 October 2002 04:08

Re: Split

2002-10-13 Thread Todd W
Dan wrote: open (DYNIXDBF, dynixte.txt); my @dynixdata = DYNIXDBF; close(DYNIXDBF); # there's no need for the file to be open all the time during processing # the file's data is in @dynixdata, so the file can be closed immediately # and the data in @dynixdata remains. If the file is