Thanks, that was what I needed!
And by distorted I meant that it uploaded the file and it was the right hight and width, but the image was screwed up, like three times as bad as if you saved a .bmp with tons of detail as a .gif. x_x
_______________________________________
You don't know me.
Hi, I'm having a problem uploading a file using perl. I can get the file uploaded but it becomes distorted. Here's the uploading part of the script.
open(OUT,">./mywebs/ETbyrne/youth/album/images/$random.jpg") or &error("Can not open outfile for writing: $!");
flock(OUT,LOCK_EX);
my $file_len...
Also note: I think it might have something to do with the one of the subroutines but I'm not sure.
_______________________________________
You don't know me.
Hi, I'm getting a pretty un-helpfull error from my a registration script I made. Here's the error:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
Error
1
Here's the script:
#!/usr/bin/perl -w
use strict...
So how would I go threw the file and read it? The only way I know is looping, which requires the opening.
open(FILE, "$feed") or die ("Can not open rss feed: $!");
seek(FILE,0,0);
my @file = <FILE>;
close FILE;
foreach (@file)
{
print "$_";
}
NOTE: I don't just want to print the file to...
I tried this but I am getting an error. Here is my script:
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use Fcntl qw(:flock :seek);
use LWP::Simple;
use lib qq*./tylermenezes/lib/*;
my $feedpath = param('feed') or die ('You have to select a feed!');
my $feed = get "$feedpath";
my...
I have a script that takes a url that someone enters in it and then the script is then supposed to open the file that the url points to and read it. The problem is I am not sure how to do this because to use perls open command you have to enter the machine path to the file.
Is there a way to...
I found out what it was. It was that I had to change
open(FILE, ">>feed.rss");
to
open(FILE, "+<feed.rss")
_______________________________________
You don't know me.
Ok, I used both of them (that is the last two ones you posted) but it won't match <item>test</item> or anything else like that.
_______________________________________
You don't know me.
Hi, I want to go threw a file until a line matches a pattern. It then prints that line and exits. The pattern I want to match is: <item>anything</item>
Her is my script so far.
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use Fcntl qw(:flock :seek);
open(FILE, ">>feed.rss") or die...
Thanks, it works now, but I kept one of the locks in so that the file newmaps.txt doesn't get corrupted when two people run the script at once.
_______________________________________
You don't know me.
I'm having trouble printing the last ten lines from a text file to another text file. It works until it gets to the line 20 and I get this error...
Use of uninitialized value in string at e:\0\74\38\237038\user\240783\htdocs\mywebs\ETbyrne\cgi-bin\redalert\ten_newest_maps.pl line 20.
here's my...
I'm still getting that error. I've checked many times to make sure that the dir http://www.mywebsfree.com/ETbyrne/portal/portals does exist.
I've tried a number of formats for finding the dir. Here they are.
chdir "portals";
chdir ">>./mywebs/ETbyrne/portal/portals";
chdir...
Thanks for the heads up Kirsle.
I have a section in my book about .htaccess. It is a little bit hard to follow though...
I checked to see if it was a typo before I posted here, so that wasn't the problem.
So you're saying is I put it in let's say ./home/random/dirs/$author/password.txt and...
Right, I was thinking about doing an .htaccess login system. Do you think that would be good?
This login system is just so I can test the rest of my site out anyways, so don't worry. ^_^
_______________________________________
You don't know me.
Hi, I'm getting an odd error with my script, here's the error:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
Could not open dir portals: No such file or directory at...
Ok, so I don't nead to chomp anything for this. It still doesn't work, of course. Hmmm...
Oh, I have another (yes another) question. I've been looking and looking thru my books and they don't say anything on writing permisions to folders after they are created. How can you do this? (From a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.