> If you are not interested in using the modules, it is not actually that
hard
> to roll your own. In the past I have done different things for total
> counts, either two separate queries, one just a 'SELECT COUNT(*)' and
the
> other to actually fetch the data. Depending on your data you might b
The reason this works is that when you read from STDIN, you are getting the
newline from when the user of the program hits return. Using '=~' is
implying a 'match', which will match the string/regexp supplied within the
variable's value. 'eq' means the two strings have to be exactly equal to
ea
A cleaner way to do it is:
printf "%s, %s %s %s %s\n", (split ' ', localtime)[0,2,1,4,3];
Or, if you want to save it to a variable:
my $dateout = sprintf "%s, %s %s %s %s\n", (split ' ', localtime)[0,2,1,4,3];
Paul
11:57am, Susheel Koushik wrote:
use this:
$str = localtime;
@fields = split/
Derek, it was nice of you to include your title and all. That way when a
future (potential) employer Googles you, they'll know for sure that it was
you that was this childish and immature.
8:13am, Derek Ash wrote:
Perl Sucks!
Derek Ash
Application Programmer II
University of Illinois Colleg
From 'perldoc -q taint'
Found in /usr/lib/perl5/5.8.8/pod/perlfaq7.pod
How can I tell if a variable is tainted?
You can use the tainted() function of the Scalar::Util module,
available from CPAN (or included with
Perl since release 5.8.0). See also "Laundering and Detectin
Yesterday, Chris Devers wrote:
On Tue, 21 Mar 2006, julian thomas p wrote:
but when i tried to run inweb server(biosolutions.siteburg.com) iam
getting a blank page rather than results.
permission level for script is 711 and for cgi folder 700.
Can [you] please post some code?
Can you writ
3:43pm, Mary Anderson wrote:
Hi All,
I am running Perl 5.8.7 (ActivePerl) on a Windows XP platform. I have
been unable to open files from a CGI.pm script. Here is the offending code:
use CGI qw/:standard :html3 :netscape/;
use POSIX 'strftime';
use CGI::Carp('carpout');
open(LOG,">>.\gue
perldoc -q timestamp
12:42am, Vance M. Allen wrote:
I'm trying to find out how to determine the date and/or time that a file was
created in a simple procedure. I have heard about a few different libraries
but the examples I have found haven't been very useful.
The basic purpose I want to do
You might want to look at how sourceforge.net handles things when you go to
download. I don't know the mechanism, but it's the behavior you want.
Paul
3:23pm, Denzil Kruse wrote:
--- Bob Showalter <[EMAIL PROTECTED]>
wrote:
use CGI qw(:standard);
open FILE, ...blah blah...
pri
No problem. Glad to help, especially since you did the right thing (tried
something, tried to work it out, and posted your code when you couldn't).
8:24pm, Mike Blezien wrote:
Ah! ... had is ass-backwards, I though it didn't look right. Thank you for
your help...much appreciated :)
P
7:22pm, Mike Blezien wrote:
Hello,
I've gone through serveral posting regarding sorting hashes, but can't seem
to get it to sort correctly. I need it to sort on the key value and not the
key
it reads from a file like this:
1::sometext_here
2::sometext_here2
3::sometext_here3
And reads the data l
Are you sure that cdrecord needs to run as root? You might check into
changin permissions on the device itself. Or if this is a trusted
machine/environment (I assume it is, 'cause most people don't write web apps
to burn CDs), then you could suid cdrecord itself as root. Be sure you
understand
I'm not saying you have to become root. I'm simply saying that for some
people it's a temptation ("If I change this to root, I don't have to worry
about ownership problems ever again").
6:21pm, Vladimir D Belousov wrote:
Why root? Just the user who has permission
group you specify.
Paul Archer wrote:
This is a very common problem. When you run the script from the command
line, you are running it with different privileges and a different path
than when the web server runs it.
Most likely, either the command is not in the path for CGI scripts (try
setting
This is a very common problem. When you run the script from the command
line, you are running it with different privileges and a different path than
when the web server runs it.
Most likely, either the command is not in the path for CGI scripts (try
setting $ENV{PATH} or calling the command with
Keep in mind two things: 1) you may need to build the module locally on a
similar box (linux, same basic version of Perl), and 2) since the module is
Time::HiRes, there needs to be a Time directory in your modules directory,
and the HiRes.pm file need to be in that directory.
EG:
~bobmin/perlmod
8:20am, Gary Stainburn wrote:
On Thursday 03 February 2005 6:50 pm, Paul Archer wrote:
4:19pm, Ing. Branislav Gerzo wrote:
Hi all,
My friend is making website in PHP, but my scripts are in Perl, for
example user write some text, and I want for example print it
uppercase (I know, bad example, but I
4:19pm, Ing. Branislav Gerzo wrote:
Hi all,
My friend is making website in PHP, but my scripts are in Perl, for
example user write some text, and I want for example print it
uppercase (I know, bad example, but I want/have to do it - something
different and more complex - in my case via Perl).
So I'
1:49pm, Chad Gard wrote:
Thanks for tips/pointers, all.
I was unable to make the graphs consistently small enough to use the data url
scheme that David pointed me toward. For now, I opted for passing enough off
to another script to make another database request. It's causes several
redundant S
11:03am, Chad Gard wrote:
On Jan 21, 2005, at 10:22 AM, Sean Davis wrote:
You could also have your main script generate the images all at once (at
the same time as you are generating the HTML), put the graphics in temp
files, and then put the appropriate URLs in the img tags. This will
eliminat
I just tried that on the command-line, and I'm not getting the warning
you're seeing. What version of Perl are you running?
And have you tried alternatives like
my @files = `ls`;
or using opendir/readdir?
Paul
Yesterday, David Gilden wrote:
Last question here,
#!/usr/bin/perl -wT
Snip ..
2:48pm, Robert wrote:
I have a form that is submitting and the url ending is "?position=BSIPL". My
form has "method="get"" in it. I have tried it without a method as well.
I have in my CGI:
my $pid = $q->param('position'); # which should now hold BSIPL right?
My SQL is as so:
my $sth = $dbh->prepa
I'm no CGI expert, but my best guess is that you are not going to be able to
stop the user from resending the data, so you are going to have to make sure
you ignore the resent data. I would do this by generating a random number in
a hidden input field when creating the form. Then you can check that
problem on your own. If you can't, then
write to the *appropriate* forum (as someone else mentioned,
this has nothing to do with CGI, so you should have posted
to a different list). And when you write, post not only the
prob
r position (MySQL is a wannabe and nearly end-of-life).
While I am not refuting your claims, I would appreciate a little evidence in
support of these claims so that I can better judge for myself.
Thanks,
Paul Archer
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-m
This has zip to do with Perl or CGI. If you're going to post off-topic, at
least have the courtesy to say "Hey, this is off-topic, but I haven't been
able to find the answer anywhere else..."
That said, try ntop (www.ntop.org).
Paul Archer
1:56pm, Werner Otto wrote:
> Hi
1:08pm, Werner wrote:
> Hi There,
>
> I've got a html page that uses the following:
>
> enctype="multipart/form-data">
>
> and would like to change the "GET" method to the "POST" method.
>
> my current people.cgi looks like:
>
> $temp=$ENV{'QUERY_STRING'};
> #read(STDIN,$temp,$ENV{'CONTENT_LENGTH
3:03pm, Aben Siatris wrote:
> > : my $number=(0.75-0.54)/0.03;
> > : print "$number\n";
> > : for (0..$number)
> > : {
> > : print "$_ / $number\n";
> > : }
> > :
> > : my $number=(75-54)/3;
> > : print "$number\n";
> > : for (0..$number)
> > : {
> > : print "$_ / $number\n";
> > : }
> > :
> > :
3:01pm, Richard Heintze wrote:
> This code is not reading the entire file. It is my
> intent that it read the entire file. Can somone help
> me remedy this problem?
>
> Thanks,
>Siegfried
>
> open (INFILE, "data.txt");
Are you sure your file opened properly? Did you check?
open (INFIL
Tomorrow, Jan Eden wrote:
> Hi all,
>
> I wrote a little form mail script and start by setting the environment variables
> like this:
>
> BEGIN {
> $ENV{PATH} = "/usr/sbin";
> delete @ENV{ qw( IFS CDPATH ENV BASH_ENV) };
> }
>
Why are you deleting these variables?
> Now the actual direc
> I've created a subrutine to acces DB, but while sending the Query it get an
> error.
>
> My function looks like:
>
> sub DbSqlQuery
>{
>local $str_query = @_ if @_;
(Why are you using local? 'local' is deprecated in favor of 'my'.)
$str_query is a scalar, @_ is an array. Putting a scala
12:15pm, Greg Schiedler wrote:
> OK I'm trying to modify the code below to recognize an additional next if statement.
> I have
> included a snip of the file that the code uses an input.
>
> Greg
>
> next if /Acct-Session-Id = ""/;This statment works!
>
A 'next if /./' is a short
My guess is that since you're running sudo, sudo itself is asking for a
password *for the nobody/apache account*, where it's set up not to ask you
for a password (which is bad mojo), or you already ran sudo once and you've
got a valid ticket.
Paul Archer
11:38am, Andrew Gaffne
33 matches
Mail list logo