comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
January 2008
motuwethfrsasuw
 123456 1
78910111213 2
14151617181920 3
21222324252627 4
28293031    5
2008
 Jan   Feb   Mar   Apr 
 May   Jun   Jul   Aug 
 Sep   Oct   Nov   Dec 
2008 2007 2006  
total
comp.lang.perl.misc Profile…
RELATED GROUPS

POPULAR GROUPS

more...

 Up
  Perl and Qt4         


Author: John Bokma
Date: Jan 22, 2008 20:03

I found some old (dead?) Qt for Perl project(s) and was wondering if there
is such a thing as Perl Qt4 bindings?

no comments
  FAQ 9.11 How do I redirect to another page?         


Author: PerlFAQ Server
Date: Jan 22, 2008 18:03

This is an excerpt from the latest version perlfaq9.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

9.11: How do I redirect to another page?

Specify the complete URL of the destination (even if it is on the same
server). This is one of the two different kinds of CGI "Location:"
responses which are defined in the CGI specification for a Parsed
Headers script. The other kind (an absolute URLpath) is resolved
internally to the server without any HTTP redirection. The CGI
specifications do not allow relative URLs in either case.

Use of CGI.pm is strongly recommended. This example shows redirection
with a complete URL. This redirection is handled by the web browser.

use CGI qw/:standard/;

my $url = 'http://www.cpan.org/';
print redirect($url);
Show full article (2.16Kb)
no comments
  XML results questions         


Author: sharon
Date: Jan 22, 2008 13:47

I'm retrieving an XML result from a website and the the result changes
according to the number of Items returned.
if only one item returned the XML use a hash to hold the name and
value, however if more then one Item was returned it uses an Array to
hold all the results.
I'm trying to right a foreach statement to extract all the information
and when I get one Item I get an error that this is not an Aray
referance (which is obvius).
does anyone have a seggestion, how can I find if the results are in an
array or a hash?

Thanks
Arik
6 Comments
  FAQ 8.46 What's the difference between require and use?         


Author: PerlFAQ Server
Date: Jan 22, 2008 12:03

This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

8.46: What's the difference between require and use?

Perl offers several different ways to include code from one file into
another. Here are the deltas between the various inclusion constructs:

1) do $file is like eval `cat $file`, except the former
1.1: searches @INC and updates %%INC.
1.2: bequeaths an *unrelated* lexical scope on the eval'ed code.

2) require $file is like do $file, except the former
2.1: checks for redundant loading, skipping already loaded files.
2.2: raises an exception on failure to find, compile, or execute $file.

3) require Module is like require "Module.pm", except the former
3.1: translates each "::" into your system's directory separator.
3.2: primes the parser to disambiguate class Module as an indirect object.
Show full article (2.13Kb)
no comments
  XML Reference problem         


Author: sharon
Date: Jan 22, 2008 10:43

I have an XML hash that has $xmlResults->{Ack} = Failure
I use an if statement with $xmlResults->{Ack} == "Success" and getting
true instead of false.
I about to pull some hairs about and I don't have to many left, please
help me save the last ones I have.

thanks
Arik
3 Comments
  little problem with xml::dom::parser         


Author: mathias wündisch
Date: Jan 22, 2008 06:39

dear group,

i have a little problem with the automatic conversion from unicode
entities in real characters by XML::DOM::Parser (or XML::Parser). for
example i have the string '&x#A0;' in a xml source file and i want it
after parsing with XML::DOM::Parser also in the target xml file.

begin source file:


Mathias Wuendisch

end source file:

begin perl script:
#!c:\perl\bin\perl.exe -w
use XML::DOM;
use strict;
Show full article (1.63Kb)
no comments
  FAQ 9.4 How do I remove HTML from a string?         


Author: PerlFAQ Server
Date: Jan 22, 2008 06:03

This is an excerpt from the latest version perlfaq9.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

9.4: How do I remove HTML from a string?

The most correct way (albeit not the fastest) is to use HTML::Parser
from CPAN. Another mostly correct way is to use HTML::FormatText which
not only removes HTML but also attempts to do a little simple formatting
of the resulting plain text.

Many folks attempt a simple-minded regular expression approach, like
"s/<.*?>//g", but that fails in many cases because the tags may continue
over line breaks, they may contain quoted angle-brackets, or HTML
comment may be present. Plus, folks forget to convert entities--like
"<" for example.

Here's one "simple-minded" approach, that works for most files:

#!/usr/bin/perl -p0777
s/<(?:[^>'"]*|(['"]).*?\1)*>//gs
Show full article (2.42Kb)
no comments
  Variable interpolation and m in regular expression matching         


Author: Josef Moellers
Date: Jan 22, 2008 05:42

We were just discussing this and weren't able to resolve:

Imagine I have a variable $var and I'd like to use the m modifier on a
regular expression to match a line ending with "word" and the next
beginning with "var":

if (/word$var/m) ...

how does perl treat this: as "word" anywhere on a line followed by
whatever is in $var or as I described above?

Josef
--
These are my personal views and not those of Fujitsu Siemens Computers!
Josef Möllers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize (T. Pratchett)
Company Details: http://www.fujitsu-siemens.com/imprint.html
12 Comments
  Electronic and Computer Science video courses, No login, No fee         


Author: AK444
Date: Jan 22, 2008 04:19

Hi Guys

Good news is 23 Electronic and Computer Science video courses
are free, No login, No fee. All you need to have is real player
installed on your PC.

Electronics is at
http://freevideolectures.com/electronics/circuits_and_electronics.php
Computer Science is at http://freevideolectures.com/ComputerScience/Computer_System_Engineer...

Keep Learning..........

Bye
1 Comment
  Posting Guidelines for comp.lang.perl.misc ($Revision: 1.8 $)         


Author: tadmc
Date: Jan 22, 2008 00:13

Outline
Before posting to comp.lang.perl.misc
Must
- Check the Perl Frequently Asked Questions (FAQ)
- Check the other standard Perl docs (*.pod)
Really Really Should
- Lurk for a while before posting
- Search a Usenet archive
If You Like
- Check Other Resources
Posting to comp.lang.perl.misc
Is there a better place to ask your question?
- Question should be about Perl, not about the application area
How to participate (post) in the clpmisc community
- Carefully choose the contents of your Subject header
- Use an effective followup style
- Speak Perl rather than English, when possible
- Ask perl to help you
- Do not re-type Perl code
- Provide enough information ...
Show full article (16.63Kb)
no comments
1 2