File upload - probably simple..

2002-12-22 Thread james lundeen
hey, do you have a solution to this? I need to upload a file, but i just want the file name, not the entire path. Currently, it saves the actual file on the server as: G:\ISIR\ISIR2002gallery\images\isir1.jpg as the FILENAME!!! i just want it to save as isir1.jpg or whatever the filename is

Re: broadcast photo on other site not by up load

2002-12-22 Thread zentara
On Sat, 21 Dec 2002 14:07:03 -0700, [EMAIL PROTECTED] (Eric Lin) wrote: Now I am in linux again, I did /usr/bin/perl /usr/lib/cgi-bin/showphoto.pl mytestout.jpg then at netscape 7 's url type /home/fsshl/mytestout.jpg it showed --- The image

Re: File upload - probably simple..

2002-12-22 Thread Octavian Rasnita
Use regular expressions to get only the file name from the path. You should use something like this: $path =~ s/^.*[\\\/]//; Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: james lundeen [EMAIL PROTECTED] To: beginners-cgi [EMAIL

IF statments

2002-12-22 Thread David Gilden
Holiday greetings, I would like to be able to test for either of the two secret words but it seems to fail, what am I missing? Thanks Dave #!/usr/bin/perl use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); use strict; my $qs = $ENV{'QUERY_STRING'}; my $secret_word = 'one'; my

Re: Why does this code fail?

2002-12-22 Thread R. Joseph Newton
HI Satya, I'd say skip the sladhes in your join statement. They shouldn't be necessary. If you wish to quote the elements you could try : $env_final[$i] = join (\, \, $fields[1], $fields[2], @temp_str - 1); The important distinction between split and join is that split uses a pattern /$1/,

Re: Read-Write Mode Not Working (update)

2002-12-22 Thread R. Joseph Newton
This is interesting. You called this an inplace edit, but it sounds a lot like it is srill a transfer. Otherwise there would be no need for any backup extension. This sounds essentially like an optomistic save, assuming that the procedure will finish gracefully.I think that if you examine

Re: to php or to perl, that is the question

2002-12-22 Thread R. Joseph Newton
Hi David, As a user support tech, I'd certainly appreciate it if you and others would stick with Perl and standard html for coding. I've had some frustrating experience with PHP-generated images--they dont't print properly across browsers because they are transmitted as a bit satream rather

Re: again a regex help needed

2002-12-22 Thread R. Joseph Newton
Hi, Maybe try: if ($file =~/\..*\./) { ... } I just checked it. It works. Joseph Marco Centemeri wrote: Hello All, I'd like to know if a file name is like namefile.ext (only one dot in the name) or namefile.xxx.z.ext (more than one dot in the name). I tried with regex:

Re: Fw: HTTP Requests

2002-12-22 Thread Randal L. Schwartz
Rob == Rob Dixon [EMAIL PROTECTED] writes: Rob It's not appropriate to correct anything but misleading advice. It's misleading to handcode application/x-www-form-urlencoded values when more proper higher-level functions are available, such as HTTP::Request::Common. I thought the URL was

Re: @INC question after conversion to linux.

2002-12-22 Thread Michael Hooten
On Sat, 2002-12-21 at 10:48, Paul Johnson wrote: On Fri, Dec 20, 2002 at 04:13:49PM -0500, Michael Hooten wrote: I have added RedHat linux as a boot alternative to Win 2k. Of course, the stability of linux is superb but I am not yet accustomed to compiling every single thing I need that

Re: Editors

2002-12-22 Thread R. Joseph Newton
Hi Paul, Don't know about the Unix side but for Windows: Programmer File Editor for Windows http://www.lancs.ac.uk/people/cpaap/pfe/--allows mode setting by class for indentation, file-saving , a number of other parameters that make coding much more easy. I've also used Borland C++ 5.02 and

RE: Expanding a variable

2002-12-22 Thread Bob H
I can actually do that. : ) What I need to do is take the contents of the $file variable expand it and then run some system() commands using it. The print only shows to console. Can I do anything with that? -Original Message- From: Wagner, David --- Senior Programmer Analyst --- WGO

Re: Perl and Arrays

2002-12-22 Thread Johnstone, Colin
John, Im sorry I didn't reply earlier it is just Monday morning here in Sydney and have just returned to work. I have recently discovered these lists, they are great. One of the first problems I faced when I started this job only a year ago was that I had no mentors in my workplace it was

Re: Expanding a variable

2002-12-22 Thread Rob Dixon
Hello Bob You can use a variable within double quotes. It will be replaced by its value at runtime. The same applies to backticks, so you could do: system (cat $dir); or @dirlist = `cat $dir`; HTH, Rob Bob H [EMAIL PROTECTED] wrote in message

Re: @INC question after conversion to linux.

2002-12-22 Thread Michael Kelly
On Sun, Dec 22, 2002 at 09:38:44AM -0500, Michael Hooten wrote: export PERL5LIB=/usr/local/lib/perl I added this to .bash_profile. I then executed it with no change. I had to relogin to see the changes. Is this the case? The .bash_profile file is sourced when you log in, so unless you

Re: Expanding a variable

2002-12-22 Thread Michael Kelly
On Sun, Dec 22, 2002 at 04:33:41PM -0500, Bob H wrote: I can actually do that. : ) What I need to do is take the contents of the $file variable expand it and then run some system() commands using it. The print only shows to console. Can I do anything with that? What do you mean, expand it?