Re: Sorting a hash

2004-10-04 Thread Octavian Rasnita
From: "Gunnar Hjalmarsson" <[EMAIL PROTECTED]> > >> You don't need another hash. > >> > >> perldoc -f sort > >> perldoc -q "sort a hash" > >> > >> my @codes = sort { > >> $comp{$a}{$year}{profit} > >> <=> > >> $comp{$b}{$year}{profit} > >> } keys %

Sorting a hash

2004-09-28 Thread Octavian Rasnita
Hi all, I have a hash that have multiple sub hashes and I want to sort it by a sub key. For example, I have: $comp{$code}{$year}{profit}. And I want to sort the $code values after the value of the "profit" key. Is this possible directly, or I will need to create another hash for doing this typ

Using a variable in a perl module

2004-09-18 Thread Octavian Rasnita
Hi all, Does anyone know how can I use in a perl module a certain variable defined in the main program? I know how to Export a variable from the module to the main program, and in fact that module uses OOP, but I don't know how to send a variable from the main program to the module, or how to modi

Making the program run faster

2004-09-18 Thread Octavian Rasnita
Hello all, I have made a program and I have made some benchmarks in order to see how much time consumes each part of it, and I was pretty surprised when I've seen that the CGI module takes very much comparing with the other parts of the program. Well, I don't need very many methods from the CGI li

mms:

2004-09-15 Thread Octavian Rasnita
Hi all, Does anyone know a perl library that can be used for saving a stream broadcasted using the mms: protocol into a .mp3 file? Thanks. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

DirectoryIndex

2004-09-12 Thread Octavian Rasnita
Hello all, I have named index.html a file that in fact is a perl cgi program and I have put it in the directory /cgi-bin/ It works fine if I access it using an URL like: http://localhost/cgi-bin/index.html The problem is that I want to access that program using: http://localhost/cgi-bin/ But

PHPerl

2004-09-08 Thread Octavian Rasnita
Hi all, Is there a way to embed Perl programs in html like PHP can do? I heard that Perl can be used in ASP files, but I am wondering if there is an Apache module for that task. It would be cool to exist such a thing... Thanks. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additiona

Re: CGI scripts, security and MySQL

2004-09-03 Thread Octavian Rasnita
ot be only "user" and "pass"), and after that chmod that special dir in order to be viewd only by the root. T Teddy - Original Message - From: "Chris Devers" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]> Cc: <[EMA

Re: CGI scripts, security and MySQL

2004-09-03 Thread Octavian Rasnita
- Original Message - From: "Chris Devers" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>; "michael watson (IAH-C)" <[EMAIL PROTECTED]> Sent: Friday, September 03, 2004 3:31 PM Subject: Re: CGI script

Re: CGI scripts, security and MySQL

2004-09-03 Thread Octavian Rasnita
Hi, You can put something like this, in httpd.conf file: include ...path_to_file And make the directory where sits that file readable only by the root user. Then, in that file, put something like: SetEnv usr user_name SetEnv pass parolissima Those 2 environment variables will be seen by any s

Re: Cookies v. Hiddent Fields

2004-09-01 Thread Octavian Rasnita
From: "Siegfried Heintze" <[EMAIL PROTECTED]> > What is the difference (as far as security goes) between using a cookie and > a hidden field? Are hidden fields cached if we are using SSL? I think not. > > Both have the same security. A hidden field is simpler to be viewd by a user, but a cracker

Re: Locating the root directory to find files on a web site

2004-07-21 Thread Octavian Rasnita
Use the %ENV hash T - Original Message - From: "Ron Goral" <[EMAIL PROTECTED]> To: "Perl Beginners - CGI" <[EMAIL PROTECTED]> Sent: Wednesday, July 21, 2004 3:00 PM Subject: Locating the root directory to find files on a web site > Howdy - > > I have a module that needs to locate the ro

server push

2004-07-11 Thread Octavian Rasnita
Does anyone know if Internet Explorer 6 supports server push? Thanks. Teddy, teddy.fcc.ro [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Executing a subroutine from a runtime chosen module

2004-07-10 Thread Octavian Rasnita
Hi all, Does anyone know how can I do something like: my $mod = "Module.pm"; #Then require this $mod module (using eval() #Then executing a certain subroutine from that module and getting the results. I found that I can require a module and execute it entirely but I am not able to choose to e

Reading a file

2004-07-09 Thread Octavian Rasnita
Hi all, Does anyone know how can I read a file from a UNC path? Is perl able to read files this way? Thank you. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: popup_menu

2004-06-24 Thread Octavian Rasnita
BTW, regarding XForms, does anyone know if they are supported by the browsers, and if yes, where can I get more information/manual about using them? Thank you. Teddy - Original Message - From: "Wiggins d Anconia" <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

parsing Latex documents

2004-06-18 Thread Octavian Rasnita
Hi all, I want to parse Latex documents with Perl, and to analyse their structure for translating them with spoken words for the blind. Do you know if the single way is to parse those documents like HTML::TreeBuilder parse the HTML files, or is there a parser that can get the Latex elements? I w

Re: How to host CGI scripts ?

2004-06-18 Thread Octavian Rasnita
And BTW, I am sure most of the listers will be able to help you with some advice about your problem if you will install the Apache web server for Windows from www.apache.org. It is much more used than IIS, much secure, and with many other advantages, and also free. Teddy - Original Message

Re: Printing a multipart HTML output

2004-06-08 Thread Octavian Rasnita
page, Internet Explorer and other browsers will be able to read it for sure. Thanks. Teddy - Original Message - From: "Wiggins d Anconia" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, June 08, 200

Printing a multipart HTML output

2004-06-08 Thread Octavian Rasnita
Hi all, Please tell me how can I create a multipart html file that includes html text and images. I know that Mime::Lite can create such a thing for sending an email with attachments, but I don't know if it is possible to use it for creating common HTML pages with multipart content. Thank you. T

Re: CGI and mySQL book, any recommendation.

2004-06-01 Thread Octavian Rasnita
Does this mean that PostgreSQL is faster than MySQL? In most simple web applications I could work even with text files databases, so MySQL is very enough. But if PostgreSQL is faster, the situation changes... Teddy - Original Message - From: "Randal L. Schwartz" <[EMAIL PROTECTED]> To:

Re: Creating a table automaticly

2004-05-31 Thread Octavian Rasnita
Thank you much. I will try that. Teddy From: "zentara" <[EMAIL PROTECTED]>> > > You might try abiword, it takes alot of commandline options. > I don't know how it handles tables though, but you could > parse the output. > > > system( 'abiword', '--to=html', $file ) > or warn "Canno

Creating a table automaticly

2004-05-31 Thread Octavian Rasnita
Hi all, I need to read an MS Word file, get the text from it and print it as an HTML page. I can get the text if I run the program under Windows, but: 1. I don't know how I can get the tables and transform them in HTML tables and 2. I don't know how can I get the text if I run the program under L

Re: CGI and mySQL book, any recommendation.

2004-05-30 Thread Octavian Rasnita
From: "Randal L. Schwartz" <[EMAIL PROTECTED]> > Please, never ever post the URL to your website. "Blind leading > Blind" comes to mind. > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Well... talking about that saying, I am blind and I have tought other bl

Re: Displaying another page

2004-05-17 Thread Octavian Rasnita
Hi, You can do something like this: print "Location: http://www.site.com/file.html\n\n";; Teddy - Original Message - From: "Werner Otto" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 17, 2004 12:13 PM Subject: Displaying another page > Hi there, > > I have the followi

Deleting a dir

2004-05-12 Thread Octavian Rasnita
Hi all, If the user Apache which runs the cgi scripts on my server want to delete a file that has restrictive priviledges and is owned by another user, how can I make a cgi program to be able to delete those files? I don't know very much about Unix/Linux yet... Thank you. Teddy -- To unsubsc

System()

2004-05-12 Thread Octavian Rasnita
Hi, I have tried: system("zip", "-r", "archive", "*"); But this tells me that the file "*" cannot be found. I guess the shell thinks that I want to pass the quoted string "*" and not only the * character to match all files. I have succeeded with: system("zip -r \"archive\" *"); But I have see

Reading a Java applet

2004-05-10 Thread Octavian Rasnita
Hi all, Does anyone know if a perl program could be made to read the content of a Java applet? I have made a script that should read such an applet, get the text from it and print it on the browser. Thank you. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail

Re: Getting the values of some variables

2004-04-15 Thread Octavian Rasnita
How can I do that? I have the string in $in variable and it contains the text: "example $aa $bb $cc ..." Thanks. T - Original Message - From: "frbn" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]>

CGI and XML

2004-04-15 Thread Octavian Rasnita
Hi all, I have seen that in the last time the XML/XSLT technologies are very much promoted as beeing the future in the configuration field at least. I have tried to parse a very small XML file using XML::Simple but I found that it works very very slow. It took more than a half of a second just to

Getting the values of some variables

2004-04-15 Thread Octavian Rasnita
Hi all, I have a text file that contains a text something like this: This text contains a $aa variable and a $bb variable and a $cc one. My program reads this text and I want to replace the variables with their values, then return the result string. How can I do this? Is using s/(\$\w+)/eval($

CGI and SSL

2004-04-15 Thread Octavian Rasnita
Hi all, I want to configure my web server to use HTTPS for accessing some CGI files. What do I need to do in order to do this? Do I need to print a special header when printing something into the browser? Also, does anyone know how could I create the keys? Can I use Open SSL for this, or there a

Re: Running a Perl module

2004-04-05 Thread Octavian Rasnita
- From: "Bob Showalter" <[EMAIL PROTECTED]> To: "'Octavian Rasnita'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, April 05, 2004 3:29 PM Subject: RE: Running a Perl module > Octavian Rasnita wrote: > > Hi all > > > >

segmentation fault?

2004-04-05 Thread Octavian Rasnita
Does anyone know what could be a reason a perl program gives a segmentation error each time I run it under Linux? I have no problem with it under Windows. It is a program that uses LWP, downloads some pages, analyse them, and save the data into a text file. Thank you for any idea. Teddy -- T

Running a Perl module

2004-04-05 Thread Octavian Rasnita
Hi all I want to run a certain perl module by getting the name of the perl module from a scalar variable like: $module ="Test"; require $module; I have read in the POD documentation that I need to use: eval {require $module}; or eval "require $module"; But the problem is that I cannot get a va

Re: Output Unicode

2004-04-02 Thread Octavian Rasnita
> which google url are you accessing? > > > > >From: "Octavian Rasnita" <[EMAIL PROTECTED]> > >To: "mt m" <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> > >Subject: Re: Output Unicode > >Date: Fri, 2 Apr 2004 15:59:10 +0300 > >MI

Re: Output Unicode

2004-04-02 Thread Octavian Rasnita
Yes but I get Google's page with Internet Explorer 6 and I can see that the page uses UTF-8. And I can see teh page fine. But that example page read with IE6 also, is not read correctly. T. - Original Message - From: "mt m" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>

Re: Output Unicode

2004-04-02 Thread Octavian Rasnita
Oh thanks, this is helpful. I can see that it is very complicated to use Unicode standards. I have seen that on that page I can read the text in romanian language, but even though I can read well some chars, I am not able to read other special chars and I can read just question marks instead. I k

Re: Output Unicode

2004-03-31 Thread Octavian Rasnita
Hi, Thank you for these examples. I have tried the program, but it printed the following result on Internet Explorer 6: Reading and displaying a file with UTF-8 encoded multilingual text. Japanese string: ?? | | | ?- | | ?? Korean: ?? ??? ?? ? ???. ??? ??? ??? Hebrew ??? ?

Re: Output Unicode

2004-03-30 Thread Octavian Rasnita
Thank you. I have tried to set the header of the web page as you described, but I have seen that the special chars like şţăîâŞŢĂΠare not recognized correctly, even though the browser recognizes that the encoding is UTF-8. However, I have seen that the page returned by Google is viewed correctly

Re: Output Unicode

2004-03-30 Thread Octavian Rasnita
conia" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, March 30, 2004 5:38 PM Subject: Re: Output Unicode -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://lear

Output Unicode

2004-03-29 Thread Octavian Rasnita
Hi all, Does anyone know how could I print a UTF-8 HTML page (like Google's one)? Which modules I need to use? Is perl able to do that? Thank you. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Generating .doc

2004-03-16 Thread Octavian Rasnita
Thanks. I don't like .doc format either, but it is not my choice unfortunately. Teddy - Original Message - From: "Gary Stainburn" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, March 16, 2004

Generating .doc

2004-03-16 Thread Octavian Rasnita
Hello all, Please tell me what modules I need to use if I want to generate a Word document from a CGI program. It would be wonderful if it would work under Unix also. Thank you. Teddy -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Problem installing a module

2004-03-03 Thread Octavian Rasnita
Hello all, Does anyone know how can I configure the installation for a perl module if I want to install it using CPAN library? I want to install the perl module DBD::mysql and if I try: perl -MCPAN -e "install DBD::mysql;" It fails installing the module and it tells me that it can't find mysql

Re: Need help to divert HTML print <

2004-02-18 Thread Octavian Rasnita
You need to separate dirs and files using / and not \. Teddy - Original Message - From: "B. Fongo" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, February 18, 2004 11:22 AM Subject: Need help to divert HTML print < I tried to divert the output of print < warns of uninitiali

Re: Re: File not downloading - off topic

2004-01-23 Thread Octavian Rasnita
> I suspect that ".eml" is a recognized extension that is supposed to have > some specific format, maybe IE thinks it is in the XML class because of > the 'ml'. This is usually handled by the mime-type listing in the > browser, and possibly on the server end which determines the > content-type head

File not downloading - off topic

2004-01-23 Thread Octavian Rasnita
Hi, Sorry for this off topic subject, but I don't even know where to ask about this problem. A program on my site saves some email messages and let me download them later, and I use the .eml file extension for those files. When I try to access the URL to one of those messages, Internet Explorer 6

Re: Script within a script

2004-01-15 Thread Octavian Rasnita
You can execute that second script: require script.pl or system('perl script.pl'); - Original Message - From: "Kenneth W. Craft MCP" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 14, 2004 3:06 PM Subject: Script within a script > Is it possible to execute a perl

using crontab

2004-01-13 Thread Octavian Rasnita
Hi all, Does anyone know what line I neet to print after using the crontab -e command, in order to run a program every half an hour, at 0 minutes and at 30 minutes? Thank you very much! Teddy, teddy.fcc.ro[EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Unicode

2004-01-04 Thread Octavian Rasnita
Hi all, I have a problem printing a file encoded as UTF8. I have tried using the following script: use Unicode::String qw(utf8); my $text = "astaîâSTAÎÂz"; my $t = utf8($text); print $t; The result printed on the screen or in a file is just "az" and not the whole string. I would like those

Re: Special characters

2003-12-29 Thread Octavian Rasnita
I've tried this method, but unfortunately it doesn't work right. I have a problems with special chars from other languages. For example, if I want to type the letter t which in Romanian language is a "t" with a comma below it, I need to switch to the Romanian keyboard and press a key which types t

Re: Special characters

2003-12-28 Thread Octavian Rasnita
Oh thank you. I just wanted to make that regexp and it saved me the time. Teddy From: "J. Alejandro Ceballos Z." <[EMAIL PROTECTED]> Subject: Re: Special characters > yes, I agree, in fact we should take care about observing the 3 digits > (@ instead of @) > > maybe something like > > $cStri

Re: special characters

2003-12-27 Thread Octavian Rasnita
Re: special characters > J., > > In my experience, the numeric escapes where available seem to be more > universal between browsers. > > J. Alejandro Ceballos Z. wrote: > > > I may try with nueric equivalents (like .) or htmlspecialchars() > > or htmlentities() >

Re: special characters

2003-12-24 Thread Octavian Rasnita
TECTED]> Sent: Wednesday, December 24, 2003 6:59 PM Subject: Re: special characters > I may try with nueric equivalents (like .) or htmlspecialchars() or > htmlentities() > > > Octavian Rasnita wrote: > > Hi all, > > > > I want to create some web pages tha

special characters

2003-12-23 Thread Octavian Rasnita
Hi all, I want to create some web pages that use special characters for foreign languages (romanian), like staîâSTAÎÂ. Please tell me what can I do to make them show right in the visitors' browser. I've seen that if I just print them, they appear like a question mark instead (?). I've seen that

Re: Fork

2003-12-09 Thread Octavian Rasnita
t; <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Monday, December 08, 2003 6:58 AM Subject: Re: Fork > > > > Hi all, > > > > Please tell me how could I fork more child processes. > > I wan

Fork

2003-12-08 Thread Octavian Rasnita
Hi all, Please tell me how could I fork more child processes. I want to fork let's say 10 child processes. I know that I can do something like the following, but I am wondering if there is a clearer method: if (my $pid = fork) { #parent if(my $pid2 = fork) { #parent 2 if (my $pid3 = fork) { #p

Re: hit counter

2003-11-12 Thread Octavian Rasnita
As I said, I don't know. - Original Message - From: "Andrew Gaffney" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 11, 2003 8:55 PM Subject: Re: hit counter > Wouldn't these have the same effect? > > Octavian Rasnita wro

Re: hit counter

2003-11-11 Thread Octavian Rasnita
Tuesday, November 11, 2003 9:27 PM Subject: Re: hit counter > So, if I were to do 'cat 1.gif 2.gif 3.gif 4.gif > 1234.gif' at the command line, I'd get > a GIF that displays '1234' if each of the original file contains a number? > > Octavian Rasnita wrote:

Re: hit counter

2003-11-11 Thread Octavian Rasnita
Open each image file and print their content one after another and they will be printed right. Don't forget to use the right HTTP header for printing an image (image/gif). And don't forget to open the files using binmode if you are under Windows. But your program will be totally useless for the bl

Determining different computers with the same IP

2003-11-07 Thread Octavian Rasnita
Hi all, I heard that it is possible to differentiate 2 computers of 2 different web page visitors that have the same IP address. I know that each computer is sending some information in %ENV variable, but is there any other method to differentiate them? The information from %ENV can be changed so

How to fork a process?

2003-11-05 Thread Octavian Rasnita
Hi all, I've tried the following code: #!/perl/bin/perl -w use strict; $| = 1; print "Content-type: text/html\n\n"; my $pid=fork; if ($pid) { print "parent\n"; exit 0; } else { ⊂ } sub sub { sleep(100); open(OUT, ">>f:/teddy/.txt") or die "Can't write to .txt - $!"; print OUT "test"

Re: Finding the current path

2003-10-27 Thread Octavian Rasnita
ggins d'Anconia" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, October 26, 2003 7:12 PM Subject: Re: Finding the current path > Octavian Rasnita wrote: > > Hi all, > > > > Does an

Re: Finding the current path

2003-10-27 Thread Octavian Rasnita
ROTECTED]> To: "'Octavian Rasnita'" <[EMAIL PROTECTED]> Sent: Sunday, October 26, 2003 6:40 PM Subject: RE: Finding the current path > Teddy, > > It should be part of $0. > > HTH, > > Charles K. Clarkson > -- > Head Bottle Washer, &

Finding the current path

2003-10-26 Thread Octavian Rasnita
Hi all, Does anyone know if it is possible to find out the path in which a perl program is launched? For example, I am in /var/www and I run the following command: perl /home/script.pl And I want it to give me the result: /var/www Thank you very much. Teddy, teddy.fcc.ro [EMAIL PROTECTED

Installing modules

2003-10-16 Thread Octavian Rasnita
Hi all, Does anyone know how could I install the DBI and DBD::mysql modules under Red Hat if I don't have root rights? Thanks. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Execute an application

2003-10-15 Thread Octavian Rasnita
You cannot do that because if you want to run a program in a web browser that program should not print a graphical interface, but an HTML document, or at least it should print a proper Content-type, like text/html for example. - Original Message - From: "steve" <[EMAIL PROTECTED]> To: <[E

Email with attachment and HTML email

2003-10-07 Thread Octavian Rasnita
Hi all, I know to use the Net::SMTP module, but I would like to send an email which has a fiew file attached and to be an HTML type because I want to include an image in it. Do you know which perl module can help me doing that? Thank you. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addit

Re: SSI in subdomains

2003-09-25 Thread Octavian Rasnita
Try putting a space after the last " like: - Original Message - From: "Ramon Chavez" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 25, 2003 9:37 PM Subject: SSI in subdomains > Hello all. > > I have a problem. > I have subdomain and want to include some SSI

Re: Help wanted regading approch for displaying live scores

2003-09-23 Thread Octavian Rasnita
You will need to refresh the entire page. Or as you said, you can use iframes. - Original Message - From: "parvez mohamed" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 23, 2003 10:43 AM Subject: Help wanted regading approch for displaying live scores > Hi, > I

Re: Capturing At Compile Time

2003-09-17 Thread Octavian Rasnita
Are you sure it is a binary file? But anyway, a perl program can be made to be an executable that doesn't need perl to run it. Download Active State Perl Developer Kit from www.activestate.com for this. The file is not compiled, but the perl interpreter is included in the executable file with the p

Re: File Permissions

2003-09-07 Thread Octavian Rasnita
Read: perldoc -f chmod - Original Message - From: "Greenhalgh David" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, September 07, 2003 9:08 AM Subject: File Permissions > Hi All, > > I have a script which, amazingly, is doing exactly what it is supposed > to do. It is taki

Re: [Addendum] Stripping HTML from a text file.

2003-09-05 Thread Octavian Rasnita
It doesn't work because you check for the beginning and the end tags in the same line, but you have splitted the text in more lines, and the can be found in a line but the tag on another line probably. You can use something like this: $html =~ s|]*>.*?]*>||si; So you don't need to check each

Getting the partial content from a cgi sccript

2003-08-29 Thread Octavian Rasnita
Hi all, A few days ago I was asking what makes a server allow returning a partial content (when using the Range HTTP header). There were some discussions that the core of the server might decide that, that some modules of the server (mod_cgi and mod_php...) decide that, or that the CGI program ca

Re: fetching text/html

2003-08-29 Thread Octavian Rasnita
Yes you can. Use the LWP module. teddy.fcc.ro [EMAIL PROTECTED] - Original Message - From: "Ling F. Zhang" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, August 29, 2003 7:32 AM Subject: fetching text/html it is possible to fetch the result of a cgi/aps/cf script at some addr

Re: automated file removal / cache clearing

2003-08-28 Thread Octavian Rasnita
PROTECTED] - Original Message - From: "drieux" <[EMAIL PROTECTED]> To: "cgi cgi-list" <[EMAIL PROTECTED]> Sent: Thursday, August 28, 2003 6:58 PM Subject: Re: automated file removal / cache clearing On Wednesday, Aug 27, 2003, at 14:22 US/Pacific, Octavian

Re: automated file removal / cache clearing

2003-08-27 Thread Octavian Rasnita
Or if you don't want to depend on Unix's cron and want your program to do everything, you can set it so each time a new visitor comes to your site, checks which files are not needed, and delete them. You can use fork to avoid putting the visitors to wait until the program is doing its background jo

Re: Counter triggered on download

2003-08-25 Thread Octavian Rasnita
This is a pretty good method, but it is not so good because the visitors won't be able to use a Download manager to download the file. Or better said, they won't be able to resume the download. I am not sure, I will be testing this soon, but maybe a solution for this problem could be specifying th

Re: elsif issues ....still

2003-08-21 Thread Octavian Rasnita
Yes, it should be used ... == 1 without quoting the numbers. teddy.fcc.ro [EMAIL PROTECTED] - Original Message - From: "Lile, James AZ2 (VAW-115)" <[EMAIL PROTECTED]> To: "'Catriona Wordsworth'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Friday, August 22, 2003 6:34 AM Subject: RE: e

Re: Counter triggered on download

2003-08-21 Thread Octavian Rasnita
Put the link to a cgi script which makes an HTTP forward using the "Location=$url\n\n" header or print an HTML page which use an HTML meta refresh. This way the visitors may use a download manager to download the PDF file, and you can count the downloads. teddy.fcc.ro [EMAIL PROTECTED] - Origi

Re: right click help please?

2003-08-20 Thread Octavian Rasnita
This is not possible. teddy.fcc.ro [EMAIL PROTECTED] - Original Message - From: "Catriona Wordsworth" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, August 20, 2003 7:38 AM Subject: right click help please? Can anyone assist me with how to change the right click menu. When

Re: disable back button

2003-08-20 Thread Octavian Rasnita
You cannot disable the back button and the keyboard hotkey for this task from a perl script. You might need to use a client side program, like a Javascript one. However, you can make a page not to cache, and to expire immidiately, and this way if a visitor will press the back button the page won't

Re: perl script as binary

2003-08-14 Thread Octavian Rasnita
No, you don't need to add any dll files (at least with ActiveState Perl Developer kit). The perl interpreter is included in the .exe file by default. If you want you can choose to not include it and only in that case the perl.dll file needs to be used. Teddy, Teddy's Center: http://teddy.fcc.ro/

Re: Why executable?

2003-08-14 Thread Octavian Rasnita
lt;[EMAIL PROTECTED]> wrote: > On Mon, 11 Aug 2003 11:33:40 +0300, [EMAIL PROTECTED] (Octavian > Rasnita) > wrote: > > >Hi all, > > > >Does anyone know why the perl scripts need to have the execute > permission > >under Unix? > > > >I am asking thi

Re: Why executable?

2003-08-14 Thread Octavian Rasnita
Hmm, are you telling that I can create a perl file and name it file.html, file.php, or even file.asp, and use a shebang line in it, then it will be parsed as a perl file? Or I need to use extensions that are not set in the server's conf file to be parsed as other types? Teddy, Teddy's Center: http

Why executable?

2003-08-14 Thread Octavian Rasnita
Hi all, Does anyone know why the perl scripts need to have the execute permission under Unix? I am asking this because I've seen that the PHP files don't need this permission. Couldn't perl just read a text file (doesn't matter if it has an execute permission or not), interpret it and execute it

Selecting using regular expressions

2003-08-14 Thread Octavian Rasnita
Hi all, I want to select all the content of a table from a file using regular expressions (and not a module). Can you give me some hints about how can I do this? For example I have the following text: .. .. ... ... As you see, I could find more other tables included in th

Re: Perl line breaks

2003-08-14 Thread Octavian Rasnita
It depends how is set the web server to execute the programs that will process the CGI scripts. By default Apache is set to need the shebang line and it doesn't use the registry settings, but this can be changed. ...and you don't need to print the HTML header in the BEGIN {} block. You can just pr

Re: Perl line breaks

2003-08-14 Thread Octavian Rasnita
What web server is installed on that computer? Some web servers need to use non parsed header scripts (NPH) and I heard that this is the case with MS IIS if this is the web server. The line break is not very important for perl scripts under Windows. I use only the Unix end of line (lf) under Windo

Re: Mail::Send question

2003-08-11 Thread Octavian Rasnita
What mail module can be used to send email messages with attachments? I would prefer a module included in the perl package by default. Thanks. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Wiggins d'Anconia" <[EMAIL PROTECTED]> To: <[EMA

Re: Perl line breaks

2003-08-07 Thread Octavian Rasnita
p://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Mike Harrison" <[EMAIL PROTECTED]> To: "'Octavian Rasnita'" <[EMAIL PROTECTED]>; "Jon Hogue" <[EMAIL PROTECTED]> Cc: "'Andrew Brosnan'" <[EMAIL

Re: Perl line breaks

2003-08-05 Thread Octavian Rasnita
For troubleshooting a script you can take a look in the server's log file and you will find there any error. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Jon Hogue" <[EMAIL PROTECTED]> To: "Octavian

Re: Preserve line endings via ftp

2003-08-04 Thread Octavian Rasnita
If you set the transfer method to binary, the file is sent as it is, without changing anything. If you set it to ascii, the end of line character is set to lf for Unix/Linux, crlf for Windows, and cr for Mac. If your FTP program or the FTP library you use is not doing this correctly, this means th

Re: How to display multiple web pages depending on

2003-07-29 Thread Octavian Rasnita
Sent: Tuesday, July 29, 2003 6:12 AM Subject: Re: How to display multiple web pages depending on Octavian Rasnita wrote: > It is not very hard. > > You can use an sql statement like this: > > my $sth = $dbh->prepare("select id, name, age, bla from table order by name > l

Re: How to display multiple web pages depending on

2003-07-28 Thread Octavian Rasnita
It is not very hard. You can use an sql statement like this: my $sth = $dbh->prepare("select id, name, age, bla from table order by name limit ?, ?"); $sth->execute($skip, $show); You can get the number of rows you want to skip ($skip) and the number of rows you want to show ($show) using the CG

Re: PHP vs Perl

2003-07-28 Thread Octavian Rasnita
e, MySQL and possibly other tools for programmers, because most programmers that test their programs locally need them. ... Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Todd W." <[EMAIL PROTECTED]> To: <[EMAIL PRO

Re: PHP vs Perl

2003-07-27 Thread Octavian Rasnita
It is not very easy to install support for SSL, or the library for creating images for perl, while for PHP is much easier. ... Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Scot Robnett" <[EMAIL PROTECTED]> To:

Re: PHP vs Perl

2003-07-27 Thread Octavian Rasnita
ddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "zentara" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 27, 2003 7:43 PM Subject: Re: PHP vs Perl On Wed, 26 Feb 2003 21:38:08 +0200, [EMAIL PROTECTED] (Octavi

Re: PHP vs Perl

2003-07-26 Thread Octavian Rasnita
- From: "Wiggins d'Anconia" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 27, 2003 1:05 AM Subject: Re: PHP vs Perl Octavian Rasnita wrote: > I think the reason why PHP is used more and more much than Perl is that for > CGI related programs it i

  1   2   3   4   >