Re: SubRoutine Help

2002-01-06 Thread Michael R. Wolf
[EMAIL PROTECTED] (Dragon Nebula Web Design) writes: [...] > In this case, RTFMing is not helping (and I'd rather not > resort to the answer in the back of the book). You chose to not look? Don't let your pride get in the way of working code. AND also, don't let a simple answer get in the

SubRoutine Help

2002-01-06 Thread Dragon Nebula Web Design
Okay, first, this is NOT a homework question for the good reason that I am not currently in college. I am teaching Perl to myself, and I've managed to make it to the exercises in Chapter Four of the Llama, Third Edition and I'm stuck. In this case, RTFMing is not helping (and I'd rather not resort

Re: Resume after die?

2002-01-06 Thread Michael R. Wolf
[EMAIL PROTECTED] (Richard J. Barbalace) writes: > I'm looking into ways to do resumptive exception handling > in Perl. use Religion; # What happens after you die? I have never studied it myself; just chuckled at the name. It's on CPAN: http://search.cpan.org/doc/KJALB/Religion-1.04/Religion.

Query

2002-01-06 Thread Manish Uskaikar
Can anyone tell me if i can use threads in perl; If yes then what all library files i have to include. Also tell me how i include a system library file like "math.h" or "unistd.h" in perl. How can one include "C" libraries in perl program i.e.. *.pl Regards Manish U.

Threads

2002-01-06 Thread RAHUL SHARMA
Can anyone please help me if I can use threads in perl; If yes then what all library files I have to include. Thanks, Rahul.

Re: regexp to replace double with single quotes inside html tags

2002-01-06 Thread Michael R. Wolf
[EMAIL PROTECTED] (Birgit Kellner) writes: > Many thanks for the code, by the way. I think I can use > it, even though there remains one case where it doesn't > work: > > http://someimagefile.jpg"; alt="A > B"> > That is, cases where tag attributes themselves contain > pointed brackets (which i

Re: Using regexp to get a substring

2002-01-06 Thread John W. Krahn
David wrote: > > Hello All, Hello, > I am beginner and need some helps. Thanks a lot! > > The question is, if I have a string, for example > "C:\PerlScripts\TestSamples\StringTest.pl", This string has no back-slashes in it! Just print it if you don't believe me. $ perl -le'$string = "C:\Per

Re: where to start ?

2002-01-06 Thread Michael R. Wolf
[EMAIL PROTECTED] (Chris H.) writes: [come, sing with me, children...] > Just starting out. ...A very good place to start. > Should I learn UNIX or just Win to go with Perl ? On Unix, you begin with "usr"-"bin"-"perl", And on Win you begin with Act-ive-State. Act-ive-State! The first download

Converting HTML to text?

2002-01-06 Thread Andy Ransom
Hi, I have a requirement to convert HTML files to plain text within a perl script, and I need to preserve the formating of HTML table as far as possible, say something like Netscape does when you do a "save as text" operation. I have looked on CPAN but could not find anything appropriate (altho

Re: not perl, but need some help with Linux...

2002-01-06 Thread Andy Ransom
On Sat, 5 Jan 2002, McCollum, Frank wrote: > Does anyone know where to get help if you destroy a computer while > installing Linux...? > HELP would be greatly (I mean greatly) appreciated. Please excuse the > non-perl question, but I know we got some Linux users here and I am > desparate now

cmsg cancel

2002-01-06 Thread Michael R. Wolf
I am canceling my own article. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CGI perl html urgent

2002-01-06 Thread Brett W. McCoy
On Sat, 5 Jan 2002, mb wrote: > >I have a question, real quick. Why use the < >section of html to print out instead of just print qq~ ~; for instance? > What > >are the advantages of using this other method? > > > I' m new on perl world but I found the < tedieus > than > print table( TR( td( "

RegEx speed (was: Using regexp to get a substring)

2002-01-06 Thread Gary Hawkins
That'll work, but on a finer point, if you need to be thinking about optimization at the moment: ($substring1 = $string) =~ s/.*\\(.*)/$1/; is about 4 times slower than: ($substring2 = $string) =~ s/.*\\//; because the second one doesn't have to store the matched value inside the paren

Re: Using regexp to get a substring

2002-01-06 Thread Shawn
"David" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello All, > > I am beginner and need some helps. Thanks a lot! > > The question is, if I have a string, for example > "C:\PerlScripts\TestSamples\StringTest.pl", how do I use regexp to parse > this stri

RE: Reference problem

2002-01-06 Thread ss004b3324
> Robert Thompson wrote: > #!/usr/bin/perl > > @one_list = qw(1 2 3 4); > @two_list = qw(5 6 7 8); > @three_list = qw(9 10 11 12); > @four_list = qw(13 14 15 16); > > foreach my $array (qw(one two three four)) { > foreach my $num ( @{$array}_list ) { <== Break here > print $array . "_" . $

RE: not perl, but need some help with Linux...

2002-01-06 Thread McCollum, Frank
Yes, I am trying to get Linux on here, and Windows is completely gone. I formatted the C: drive. I keep getting this error when I try to autoboot from the linux cd, "Kernel panic: VFS: Unable to mount root fs on 09:02". Any thoughts? -Original Message- From: maximilian sichart [mailto:

Re: Using regexp to get a substring

2002-01-06 Thread Jos I. Boumans
There's 2 ways to go about it... if you always have file names, you should really use the File::Spec module (which has been core for quite some time) if you really want to use a regexp, well be my guest, but the above method is really better... i'll show you both: ### the script ### use strict

Using regexp to get a substring

2002-01-06 Thread David
Hello All, I am beginner and need some helps. Thanks a lot! The question is, if I have a string, for example "C:\PerlScripts\TestSamples\StringTest.pl", how do I use regexp to parse this string and get substring after the last backslash ("StringTest.pl"). Thanks in advance! David -- To un

Re: Variable interpolation?

2002-01-06 Thread Jeff 'japhy' Pinyan
On Jan 6, Mad B.Jones said: >$name="Dave"; >$in="textfile.txt"; >open(INFILE, "<$in"); >@string=; >$string="$string[0]"; The contents of @string are raw text. You'll need to expand the variables in it manually: perldoc -q 'expand variables' That FAQ will tell you what to

Tr: not perl, but need some help with Linux...

2002-01-06 Thread mb
-Message d'origine- De : maximilian sichart <[EMAIL PROTECTED]> À : [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date : dimanche 6 janvier 2002 11:44 Objet : Re: not perl, but need some help with Linux... >Frank McCollum wrote: > >> Does anyone know where to get help if you destroy a computer

Re: USE IMPORT REQUIRE

2002-01-06 Thread Chris Ball
On Sun, Jan 06, 2002 at 02:17:50PM +0330, nafiseh saberi wrote: > what is the difference between > "use" , "import" , "require". See 'perldoc -q use require'. 'import' is not a perl keyword, and I'm guessing that you got it from looking at Python source somewhere. It does have a use in perl, b

Re: using regular expressions to find sequences of items in data

2002-01-06 Thread John W. Krahn
"John W. Krahn" wrote: > > Jon Hans wrote: > > > > #ugly > >if ( defined $frequency{$datalist[$first]} && > > defined $frequency{$datalist[$first+1]} && > > $frequency{$datalist[$first+2]} && > > $frequency{$datalist[$first+3]} && > > $frequency{$datalist[$first+4]} && > > $frequency{$datalis

Variable interpolation?

2002-01-06 Thread Mad B . Jones
Hi everyone. A little thing I fail to understand... This of course works: $name="Dave"; $string="Hello $name"; print $string; outputting: Hello Dave Why, then, does it not work when I get the string "Hello $name" out of a file? $name="Dave"; $in="textfile.txt"; open(I

Re: regexp to replace double with single quotes inside html tags

2002-01-06 Thread birgit kellner
--On Montag, 31. Dezember 2001 01:57 -0800 "John W. Krahn" <[EMAIL PROTECTED]> wrote: > Here is the verbose version. > > $string =~ s{# start regular expression > ( # start capture > <# match a less-than symbol > [^>]+

Re: DBI

2002-01-06 Thread josh
On Sun, 6 Jan 2002, nafiseh saberi wrote: > hi dear team. > hope you be fine. i be > > I work with perl for write database with DBI . > can you help me for write that code ? > > I connect and insert but how fetch ? here's an example on fetching info from a mysql db i believe you are using post

Re: using regular expressions to find sequences of items in data

2002-01-06 Thread John W. Krahn
Jon Hans wrote: > > #!/usr/bin/perl > ### > > I am trying to find all of the reoccurring sequences > excluding the sub sequences. > > Maybe I am missing the obvious, but having a little > perl exposure and not being an expert perl programmer >

DBI

2002-01-06 Thread nafiseh saberi
hi dear team. hope you be fine. I work with perl for write database with DBI . can you help me for write that code ? I connect and insert but how fetch ? thx for your time. Sincerely yours Nafiseh Saberi People will forget what you said ... People will f

Re: where to start ?

2002-01-06 Thread nafiseh saberi
hi dear. perl is a language .. it is better to learn linux before it... but perl is a language and linux is an operating system...but if you know linux, it is better for you. you can work with active perl that run in windows.also. be successful Sincerely your

where to start ?

2002-01-06 Thread Chris H.
Just starting out. Should I learn UNIX or just Win to go with Perl ? Thnx -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

USE IMPORT REQUIRE

2002-01-06 Thread nafiseh saberi
hi dear team. what is the difference between "use" , "import" , "require". use HTML::Template; import HTML::Template; require HTML ::Template; thx. ___ Sincerely yours Nafiseh Saberi People will forget what you said ... People will forget what you did... B

Re: not perl, but need some help with Linux...

2002-01-06 Thread maximilian sichart
Frank McCollum wrote: > Does anyone know where to get help if you destroy a computer while > installing Linux...? > > Problem (of course this comes up after formatting c: drive and using a boot > disk) > 1. Linux autoboot.bat program detects windows running and will not install > (of course wind

using regular expressions to find sequences of items in data

2002-01-06 Thread jon hans
#!/usr/bin/perl ### I am trying to find all of the reoccurring sequences excluding the sub sequences. Maybe I am missing the obvious, but having a little perl exposure and not being an expert perl programmer I have hacked together some code tha

Re: CGI perl html urgent

2002-01-06 Thread mb
>-Message d'origine- >De : [EMAIL PROTECTED] <[EMAIL PROTECTED]> >À : mb <[EMAIL PROTECTED]> >Cc : [EMAIL PROTECTED] <[EMAIL PROTECTED]> >Date : dimanche 6 janvier 2002 03:50 >Objet : Re: CGI perl html urgent > > >> >>Also, I have Perl installed in /opt/local/bin/... >>so make sure line 1

Re: call a windows application (.exe) via perl

2002-01-06 Thread Michael R. Wolf
[EMAIL PROTECTED] (Mb) writes: > I asking if there is any module to make some directives > like : runing a window appli, waiting it finish and get > the result of runing. $results = qx(whatever.exe args); $results = `whatever.exe args`; -- Michael R. Wolf All mammals learn by playing!

Re: putback

2002-01-06 Thread Michael R. Wolf
[EMAIL PROTECTED] (Steven Benveniste) writes: > I have been looking for a putback fuction when reading > from a file but cannot find it. I've used an array for this kind of thing. In fact, I think I posted an answer recently that relied on it -- look if you want another example. Here's the bas

Re: putback

2002-01-06 Thread Michael R. Wolf
[EMAIL PROTECTED] (Steven Benveniste) writes: > I have been looking for a putback fuction when reading > from a file but cannot find it. I've used an array for this kind of thing. In fact, I think I posted an answer recently that relied on it -- look if you want another example. Here's the bas

Re: Print / overwrite line

2002-01-06 Thread Michael R. Wolf
[EMAIL PROTECTED] (Gary Hawkins) writes: > How can I clear a line before replacing it? If you are trying to output to a terminal, this is probably a termcap question. Try looking for "clear to end of line" in a termio or termcap module. It will necessarily depend on they kind of terminal you h

Re: lexically scoped variables [was: use strict... and my auto-increment don't increase]

2002-01-06 Thread Michael R. Wolf
[EMAIL PROTECTED] (Jenda Krynicky) writes: > From: "Michael R. Wolf" <[EMAIL PROTECTED]> > > When dealing with "my", you can look at the line that > > declares it, then backup to the smallest enclosing brace. > > The variable belongs to that scope. A scope is defined by > > an op

Re: lexically scoped variables [was: use strict... and my auto-increment don't increase]

2002-01-06 Thread Michael R. Wolf
[EMAIL PROTECTED] (Leon) writes: > and its happy&sad journey ends at the "the curly Heavenly > gates =>}". I like it! Appropriate for "eventualdeath" With a name like that you should get real sharp with scoping. -- Michael R. Wolf All mammals learn by playing! [EMAIL PROTECTE