473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

print $q->header; # How is the $q declared?

135 100+
How is the $q declared on the following line?

print $q->header;

Cheers

Ravi
Jun 11 '07 #1
4 1487
Purple
404 Expert 256MB
Hi,

on a first pass, $q is an object created with the new keyword

if you can post some more code we may be able to help better..

Purple
Jun 11 '07 #2
patelxxx
135 100+
Sorry instead of that declaration, how would I declare $result in the following PERL code:



#!c:/Perl/bin/perl.exe

use Net::Ping;
use strict;
use warnings;

my $host=217.205.137.26;
my $p=Net::Ping->new("tcp", 2);

if ($p->ping($host)) {
$result = "On-line.\n";
}
else {
$result = "Off-line.\n";
}
$p->close();


print <<EOF;

<html>
<body>
<h2> The $host is $result</h2>
</body>
</html>

EOF

__END__


Many Thanks

Ravi
Jun 11 '07 #3
Purple
404 Expert 256MB
Ravi,

The $result appears to be declared in the mid section of the code - can you clarify your question..

Also

This is a PHP forum not Pearl - can you post the question over there under a new thread..

Purple..
Jun 11 '07 #4
patelxxx
135 100+
It's ok all sorted now.

Thank you

Ravi
Jun 11 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Jayme Assuncao Casimiro | last post by:
How do I get the content of a http header named "test" in php? +---------------------------------------------+ | Jayme Assuncao Casimiro | | Graduado em Ciência da Computação...
1
by: FLUX (a l'Ircam) | last post by:
Hi Perl folk! I have the following problem : I want to upload a file (stored in a web server) to the browser, and then delete the file in the server. This file contains the results of a sound...
4
by: Julie Siebel | last post by:
Apologies...I'm sure this has been asked before, but I can't seem to come up with the correct Google search terms. While my problem is with stylesheets, the errors are being caused by my...
3
by: HugeBob | last post by:
Hi All, Is it possible to access the browser's print header/footer. I want to create a printable version of a page and alter the printout's header and footer. Is this possible? Thanks!
2
by: hdotnetdev | last post by:
in my page i have gridview control i can print the header of gridview every page but the first page only having top border but i need top border in all page or print header with color . can anyone...
45
by: Umesh | last post by:
please help. thanks.
1
by: Shalako | last post by:
I check my error log and see these entries: malformed header from script. Bad header= Missing gauge reports are ind: padata.pl /perl/pema/padata.pl did not send an HTTP header malformed...
2
by: Zuhaib Hyder | last post by:
plz guide me i'm on ly abble to print image or either only text but i want to print header and footer text with the image in middle plz guide me, how to do it in asp.net and c#
4
by: JRough | last post by:
I have this section at the end of a page ------------------- if ($_POST== 'Open in Excel'){ if (empty($data)) { $data = "\n(0) Records Found!\n";} header("Content-type:...
2
by: ravir81 | last post by:
Hi, I am working on excel reporting using Perl. I am facing problem with writing the header part only once for all the excels created using Perl. Here is the code : ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.