RE: Openning Files Names with Embedded Spaces

2003-11-25 Thread Tim Johnson
Granted, I'm on XP, but I can't seem to reproduce your error. I created a file at the path specified and it works perfectly. Are you sure that you have the exact filename and that you have access to it? (I guess it's windows 98, so you pretty much have access to everything...) Try pasting t

Openning Files Names with Embedded Spaces

2003-11-25 Thread Jeff Westman
Hi, I am using Active Perl under Windoze 98. I am trying to open a file that has embedded spaces. I tried escaping the spaces as well, and that didn't work either. #! perl -w $file = "c:\\win\\start menu\\programs\\system\\tbs montego\\_visit turtle beach web site.lnk"; print "file = $file\n";

Re: factorial function

2003-11-25 Thread Robert Brown
James Edward Gray II writes: > On Nov 26, 2003, at 1:35 AM, B. Rothstein wrote: > > > Does anyone have any suggestions on how to create an array to hold the > > value > > of 1000 factorial? > > I'm afraid I don't understand your question. An array holds multiple > values, but 1,000 fac

Re: factorial function

2003-11-25 Thread James Edward Gray II
On Nov 26, 2003, at 1:35 AM, B. Rothstein wrote: Does anyone have any suggestions on how to create an array to hold the value of 1000 factorial? I'm afraid I don't understand your question. An array holds multiple values, but 1,000 factorial is a single value. You want an array to hold all th

factorial function

2003-11-25 Thread B. Rothstein
Does anyone have any suggestions on how to create an array to hold the value of 1000 factorial? -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: symbol Perl_get_sv

2003-11-25 Thread Ying Liu
Thanks! I am working on this, lots of new things (include what's meaning of 'You Are So Toast'). Actually, I follow the direction by 'perl -V', I got: Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-R /usr/perl5/5.00503/sun4-solaris/CORE' cccdlflags='-KPIC', l

Re: symbol Perl_get_sv

2003-11-25 Thread drieux
On Tuesday, Nov 25, 2003, at 19:38 US/Pacific, R. Joseph Newton wrote: [..] d. Load Windows as the OS, install ActivePerl, and start working on Perl instead of futzing with the underlying system. Joseph are you going somewhere with this? Or is the problem that you do not understand how dynamic

Re: telnet.pm

2003-11-25 Thread Douglas Lentz
Rogerio Agostinho wrote: Does some know how to get the output when I send commands to a telnet server using a perl script??? I m using telnet.pm module I do need it today and I don’t Know what to do... :-( If some one could help me.,plzz Thanx rogerio --- Outgoing mail is certified Virus Free.

Re: symbol Perl_get_sv

2003-11-25 Thread R. Joseph Newton
drieux wrote: > OS. so given your path, we are to assume then > that you built(???) and/or downloaded for solaris? > And that you are running this on a Solaris machine??? > > If on the other hand your version of perl was not > built with Dynamic Linking, that part where you > are S Toast, you

Is slicing web images possible with perl?

2003-11-25 Thread Motherofperls
I've tried to install image magic on my server a couple years ago, but found out it wasn't necessary for my project. But now I may need it. All I want to do is slice an image and add it to a database. It has to be executed automaticall from a script. Thanks

Re: symbol Perl_get_sv

2003-11-25 Thread drieux
On Tuesday, Nov 25, 2003, at 16:18 US/Pacific, Ying Liu wrote: [..] Just installed the Tk package. I got an error: ld.so.1: /bin/perl: fatal: relocation error: file /mz/hd/liuyi/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/Tk/ Event/Event.so : symbol Perl_get_sv: referenced symbol not found

Re: Help with extracting text file

2003-11-25 Thread John W. Krahn
Zary Necheva wrote: > > Hi everyone, Hello, > I have a file with data similar to this > .. > Ex|FEx|NQxx|OUxx|GExx|OVxxx|IQ|OR > Ex|FExx|NQxx|GExxx|OVxx|OUxx|IQxxx|ORxxx > Ex|FExxx|NQxx|OUxx|OVxxx|ORx

symbol Perl_get_sv

2003-11-25 Thread Ying Liu
Happy Thanksgiving all! Just installed the Tk package. I got an error: ld.so.1: /bin/perl: fatal: relocation error: file /mz/hd/liuyi/local/lib/perl5/site_perl/5.8.0/sun4-solaris/auto/Tk/Event/Event.so : symbol Perl_get_sv: referenced symbol not found Killed Anyone can tell me what's that? How

Re: Help with extracting text file

2003-11-25 Thread Rob Dixon
Rob Dixon wrote: > > use strict; > use warnings; > > open INFILE, 'myfile.txt' or die $!; > > while () { > chomp; > my @fields = split /\|/; > my @output = grep /^(E|FE|NQ|IQ)/, @fields; > print join('|', @output), "\n"; > } > > **OUTPUT > > Ex|FEx|NQxx|IQ > Ex|FExxx

Re: Help with extracting text file

2003-11-25 Thread Rob Dixon
Hi Tim. Sorry, but may I mess with your code? :) Tim Johnson wrote: > > Zary Necheva wrote: > > > > I have a file with data similar to this > > .. > > Ex|FEx|NQxx|OUxx|GExx|OVxxx|IQ|OR > > Ex|FExx|NQxx|GExxx|OVxx|OUxx|IQxxx|O

RE: Help with extracting text file

2003-11-25 Thread Tim Johnson
This is a pretty classic example of where split and join come in handy. Here I'm reading each line, splitting it into fields by the pipe character, then creating a new array with only those fields that begin with the letters I specify. Then I use join to make a string with those fields I chos

Help with extracting text file

2003-11-25 Thread Zary Necheva
Hi everyone, I have a file with data similar to this .. Ex|FEx|NQxx|OUxx|GExx|OVxxx|IQ|OR Ex|FExx|NQxx|GExxx|OVxx|OUxx|IQxxx|ORxxx Ex|FExxx|NQxx|OUxx|OVxxx|ORxxx|IQxxx|RFxx Ex|FExx|NQxx

RE: simple module

2003-11-25 Thread Rajesh Dorairajan
perldoc perlboot -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 25, 2003 10:31 AM To: [EMAIL PROTECTED] Subject: simple module Hi all, i am new to OO programming in Perl. Can someone suggest a simple Object Oriented Perl module thru which i

Re: RES: RES: telnet.pm

2003-11-25 Thread Wiggins d Anconia
Please bottom post, and remember to group reply so others can help and be helped... > Well... after talking to u I can figure I m using a false telnet server, > plz do u know a good telnet server that u could tell me, so I ll be able > to download and make my job step on. > > Thanxss very much

Re: Using print to overwrite a line

2003-11-25 Thread Hacksaw
This is not the most elegant solution, but it did only take me five minutes. The salient part is the backspace and printing blanks bit. A more elegent solution would figure out how to destructively clear the line using something from ncurses. #!/usr/bin/perl -w $|=1; @reports = ("starting", "

Re: RES: telnet.pm

2003-11-25 Thread drieux
On Tuesday, Nov 25, 2003, at 11:22 US/Pacific, Rogerio Agostinho wrote: [..] my @output = $telnet->cmd("cleartool lsactivity -s -view $viewDesenv"); -or- my @output; my $result = $telnet->cmd('String' => "cleartool lsactivity -s -view $viewDesenv", 'Output' => [EMAIL PROTECTED]); [..] This may b

Re: RES: telnet.pm

2003-11-25 Thread Wiggins d Anconia
> I just get empties values,,, I already tried the code lines bellow but > it is not working... I have too much to do in my script.. but since I > don’t get to make it works I can t step forward, I m working on it since > 3 weeks ago but I just fails in all my tries :-( do u have any idea what >

RE: PPM3 Activestate Perl (and CPAN on Win32)

2003-11-25 Thread Guay Jean-Sébastien
> What rpm repositories does everyone use with ppm? > > The standard stock seem to be missing a lot of cpan modules. > Thanks! Here are a few I know of: http://theoryx5.uwinnipeg.ca/ppms/ <-- many CGI/Apache/DBI/GD related modules http://www.roth.net/perl/packages <-- mostly Win32 related mod

Re: Using print to overwrite a line

2003-11-25 Thread Rob Dixon
Paul Harwood wrote: > > Is there a simple way to print over an existing line? > > For example: I would like to have a progress report that reads 10%, 20% > etc. I don't want to print a new line each time. I want to write over > the existing line and have it update as it goes. Hi Paul. I presume y

Re: Can't locate object method "get" via package "LWP::UserAgent"

2003-11-25 Thread Rob Dixon
<[EMAIL PROTECTED]> wrote: > > #!/usr/bin/perl > > use strict; > use URI; > #use HTTP::Request::Common qw(GET); > use LWP; > #use HTTP::Response; > > my $browser = LWP::UserAgent->new; > $browser->env_proxy(); > my > $response=$browser->get('http://finance.yahoo.com/d/quotes.csv?s=msft&f=sl1d1t1c1o

RES: telnet.pm

2003-11-25 Thread Rogerio Agostinho
I just get empties values,,, I already tried the code lines bellow but it is not working... I have too much to do in my script.. but since I don’t get to make it works I can t step forward, I m working on it since 3 weeks ago but I just fails in all my tries :-( do u have any idea what I d=could do

PPM3 Activestate Perl

2003-11-25 Thread Paul Kraus
What rpm repositories does everyone use with ppm? The standard stock seem to be missing a lot of cpan modules. Thanks! Also on a side note is there some way I can use the perl -MCPAN -e shell with windows xp? What compilers do I need. How can I set it up? I would like to start using the stock

Re: simple module

2003-11-25 Thread drieux
On Tuesday, Nov 25, 2003, at 10:31 US/Pacific, km wrote: i am new to OO programming in Perl. Can someone suggest a simple Object Oriented Perl module thru which i can read thru and practice? i had gone thru perltoot,perlobj,perlref,perlsub etc regarding OOPs concepts in Perl. At one end the mos

Re: Using Benchmark module

2003-11-25 Thread drieux
On Tuesday, Nov 25, 2003, at 10:29 US/Pacific, Paul Harwood wrote: [..] Perfect, thanks! [..] There are "Clear and Compelling" reasons why we thump on folks about 'perldoc' is your friend. For the life of me I can never remember the odd bits that are in Perl - yet, with but a brief waltz with you

Re: Dymanic load

2003-11-25 Thread drieux
On Tuesday, Nov 25, 2003, at 05:11 US/Pacific, [EMAIL PROTECTED] wrote: Hi im am trying to build a menu. and i wont to load files into this menu dynamic. As base i use Term_ANSIMenu-0.02 This module builds a meny from sub function called items. What i wont to do is build syb function item dynamai

Re: telnet.pm

2003-11-25 Thread Wiggins d Anconia
> > Does some know how to get the output when I send commands to a telnet > server using a perl script??? I m using telnet.pm module > I do need it today and I don’t > Know what to do... :-( > If some one could help me.,plzz > Is, my @output = $telnet->cmd('ls -l'); not working for you? C

Re: Dymanic load

2003-11-25 Thread Rob Dixon
Stefan Stahl wrote: > > Hi im am trying to build a menu. and i wont to load files into this > menu dynamic. > As base i use Term_ANSIMenu-0.02 > This module builds a meny from sub function called items. > What i wont to do is build syb function item dynamaic. > > Is there anyone who don this before

Re: matching hypenated strings

2003-11-25 Thread Brian Gerard
And the clouds parted, and Rob Dixon said... > > That's a misuse of 'and' Brian. It says that the hash element > should be incremented only if the print succeeds, which isn't > what was intended. If you mean a code block then use a code > block. Mea Culpa. You're absolutely correct. Thanks for

Re: Regular Exprections

2003-11-25 Thread Hacksaw
I'm betting you don't get to dictate that the string has no newlines in it. -- A principle is an instruction in qualitative endeavour. http://www.hacksaw.org -- http://www.privatecircus.com -- KB1FVD -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED

Re: matching hypenated strings

2003-11-25 Thread deb
Hi Rob, At 18:44:10, on 11.25.03: Cracks in my tinfoil beanie allowed Rob Dixon to seep these bits into my brain:, > Deb wrote: > > > > What am I missing? > > Hi Deb. > > You're missing the hyphen from the character class. The \w class > is the same as [0-9A-Za-z_], and what you need is all of t

Re: matching hypenated strings

2003-11-25 Thread Rob Dixon
Brian Gerard wrote: > > And the clouds parted, and deb said... > > > > ## begin ## > > > > while ($name = ) { > > $name =~ /(\w*)\.*/; > > $name{$1}++; > > $name =~ /(\w+)/; > > print "$& \n"; > > } > > > > > > __DATA__ > > tibor.test.net > > mars.test.net > > moon-bx-r.test.net > > moon-bs-d.test.

Re: simple module

2003-11-25 Thread km
Hi all, I have already done it. i am looking for an object oriented module from which i can look at the code. thanks, KM --- On Tue, Nov 25, 2003 at 10:41:33AM -0800, Rajesh Dorairajan wrote: > perldoc perlboot > > -Original Mes

Re: matching hypenated strings

2003-11-25 Thread deb
At 10:17:47, on 11.25.03: Cracks in my tinfoil beanie allowed Brian Gerard to seep these bits into my brain:, > And the clouds parted, and deb said... > > What am I missing? > > Two things: > > 1) The regex you're looking for is likely /[-\w]+/, which says "match one > or more dashes or word ch

Re: matching hypenated strings

2003-11-25 Thread Rob Dixon
Deb wrote: > > Here's some test code I'm working with: > > ## begin ## > > while ($name = ) { > $name =~ /(\w*)\.*/; > $name{$1}++; > $name =~ /(\w+)/; > print "$& \n"; > } > > > __DATA__ > tibor.test.net > mars.test.net > moon-bx-r.test.net > moon-bs-d.test.net > moon-bt-321.test.net > > ## end ##

telnet.pm

2003-11-25 Thread Rogerio Agostinho
Does some know how to get the output when I send commands to a telnet server using a perl script??? I m using telnet.pm module I do need it today and I don’t Know what to do... :-( If some one could help me.,plzz Thanx rogerio --- Outgoing mail is certified Virus Free. Checked by AVG anti-v

Re: matching hypenated strings

2003-11-25 Thread Brian Gerard
And the clouds parted, and deb said... > > ## begin ## > > while ($name = ) { > $name =~ /(\w*)\.*/; > $name{$1}++; > $name =~ /(\w+)/; > print "$& \n"; > } > > > __DATA__ > tibor.test.net > mars.test.net > moon-bx-r.test.net > moon-bs-d.test.net > moon-bt-321.test

Re: perl is slick

2003-11-25 Thread Rob Dixon
Todd W. wrote: > > "Rob Dixon" <[EMAIL PROTECTED]> wrote in message > news:[EMAIL PROTECTED] > > Todd wrote: > > > > > > Perl is so slick: > > > > > > if ( $self->{code} ) { > > > $string = $self->{code}; > > > } else { > > > $self->{class}{file}{generator}{tt2}->process( > > > > $self-

simple module

2003-11-25 Thread km
Hi all, i am new to OO programming in Perl. Can someone suggest a simple Object Oriented Perl module thru which i can read thru and practice? i had gone thru perltoot,perlobj,perlref,perlsub etc regarding OOPs concepts in Perl. thanks, KM -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

Re: Using Benchmark module

2003-11-25 Thread drieux
On Monday, Nov 24, 2003, at 17:13 US/Pacific, Paul Harwood wrote: [..] Can Benchmark be used to gather performance data on a complete script rather than just a portion of code? [..] It is not what it was intended to do, And if you do the perldoc Benchmark you will notice that it references Devel:

Re: Yahoo! Getter

2003-11-25 Thread drieux
On Monday, Nov 24, 2003, at 21:45 US/Pacific, Jason Dusek wrote: [..] Okay, but let's say I want to learn how to do it anyway. It seems like a good practice problem. - Jason So far the options are a. down load an existing piece of code, work on understanding how it was buil

matching hypenated strings

2003-11-25 Thread deb
Here's some test code I'm working with: ## begin ## while ($name = ) { $name =~ /(\w*)\.*/; $name{$1}++; $name =~ /(\w+)/; print "$& \n"; } __DATA__ tibor.test.net mars.test.net moon-bx-r.test.net moon-bs-d.test.net moon-bt-321.test.net ## end ## This w

Re: Sys:Syslog

2003-11-25 Thread Beau E. Cox
On Tuesday 25 November 2003 06:48 am, drieux wrote: > On Monday, Nov 24, 2003, at 15:32 US/Pacific, Beau E. Cox wrote: > [..] > > > I'm having trouble logging to syslog on my Linux (Sorcerer) > > machine with perl 8.0.2 installed. This script logs nothing: > > > > #!/usr/bin/perl > > > > use strict

RE: Regular Exprections

2003-11-25 Thread EUROSPACE SZARINDAR
Marcos, Try this : my $str = 'aaa--%%b%bb%%--ccc--%%ddd%%--'; $str =~ s/(-{2}\%{2})(.*?)(\%{2}-{2})/$1$3/g; print "Modified str = ".$str."\n"; you will get Modified str = aaa----ccc---- Is it what you want ?? Michel -Message d'origine- De: [EMAIL PROTECTED] [mailto:[EMA

Re: Sys:Syslog

2003-11-25 Thread drieux
On Monday, Nov 24, 2003, at 15:32 US/Pacific, Beau E. Cox wrote: [..] I'm having trouble logging to syslog on my Linux (Sorcerer) machine with perl 8.0.2 installed. This script logs nothing: #!/usr/bin/perl use strict; use warnings; use Sys::Syslog qw(:DEFAULT setlogsock); setlogsock('unix'); open

RE: Regular Exprections

2003-11-25 Thread Perry, Alan
Hacksaw wrote: > > $str =~ s/--\%\%.*?\%\%--/--\%\%\%\%--/sg; You don't need all those backslashes. This works as well (and IMHO is easier to read): $str =~ s/--%%.*?%%--/----/sg; Alan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Using print to overwrite a line

2003-11-25 Thread Bob Showalter
Paul Harwood wrote: > Is there a simple way to print over an existing line? > > For example: I would like to have a progress report that > reads 10%, 20% > etc. I don't want to print a new line each time. I want to write over > the existing line and have it update as it goes. > > --Paul Use "\r"

Using Benchmark module

2003-11-25 Thread Paul Harwood
Can Benchmark be used to gather performance data on a complete script rather than just a portion of code?

Using print to overwrite a line

2003-11-25 Thread Paul Harwood
Is there a simple way to print over an existing line? For example: I would like to have a progress report that reads 10%, 20% etc. I don't want to print a new line each time. I want to write over the existing line and have it update as it goes. --Paul

Re: Yahoo! Getter

2003-11-25 Thread Kevin Old
On Mon, 2003-11-24 at 23:56, Jason Dusek wrote: > Hi All, > > Let's say I want to write a script that: > > 1) Signs on to Yahoo! Mail for me. > 2) Hits the 'Forward' button for each of my messages. > 3) Deletes everything and signs out. > > How do I learn to do t

Re: Yahoo! Getter

2003-11-25 Thread Todd W.
"Jason Dusek" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] On Monday, November 24, 2003, at 10:56 PM, Andrew Gaffney wrote: > There is atleast 1 Perl program for downloading Yahoo mail out there. Okay, but let's say I want to learn how to do it anyway. It seems like a good prac

Dymanic load

2003-11-25 Thread stefan . stahl
Hi im am trying to build a menu. and i wont to load files into this menu dynamic. As base i use Term_ANSIMenu-0.02 This module builds a meny from sub function called items. What i wont to do is build syb function item dynamaic. Is there anyone who don this before. //Stefan S -- To unsubsc

Re: Regular Exprections

2003-11-25 Thread Hacksaw
t.pl: #!/usr/bin/perl -w my $str = 'aaa --%% b%b %%-- ccc --%%ddd%%--'; $str =~ s/--\%\%.*?\%\%--/--\%\%\%\%--/sg; print $str, "\n"; -- hacksaw > perl t.pl aaa ---- ccc ---- -- All the magic is in the matching operator. The ? after the .* makes it match the

Regular Exprections

2003-11-25 Thread Marcos . Rebelo
I have this string my $str = 'aaa --%% bbb %%-- ccc --%%ddd%%--'; And I need to remove every thin bettewin '--%%' and '%%--'. Lets say /--\%\%[^\%]*\%\%--/ works more or less. The problem is if I have my $str = 'aaa --%% b%b %%-- ccc --%%ddd%%--'; Who can I resolve this problem? Thanks Marcos