comp.lang.perl.misc
  Home FAQ Contact Sign in
comp.lang.perl.misc only
 
Advanced search
December 2006
motuwethfrsasuw
    123 48
45678910 49
11121314151617 50
18192021222324 51
25262728293031 52
2006
 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
  POPL 2007 Call for Participation         


Author: sorin.lerner
Date: Dec 13, 2006 23:43

*********************************************************************
* ACM SIGPLAN-SIGACT Symposium *
* on *
* Principles of Programming Languages *
* *
* January 17-19, 2007 *
* Nice, France *
* *
* Call for Participation *
* *
* http://www.cs.ucsd.edu/popl/07 *
******************************...
Show full article (7.98Kb)
no comments
  job posting: Sr Systems Programmer needed         


Author: lmsteadman
Date: Dec 13, 2006 20:18

AGCO, Jackson Operations is nestled in the picturesque Des Moines River
Valley---in the welcoming town of Jackson, Minnesota (56143). Jackson
is a town of approximately 3600 neighbors, and is centrally located
between the booming town of Sioux Falls, SD and the resort area of the
Okoboji Lakes.

AGCO's award-winning facility is jut the tip of the iceberg! Our
employees enjoy an outstanding quality of life, great advancement
opportunities, a results-oriented work environment all while nestled
into a scenic rural area (which supports a reduced cost of living and
unbelievably low crime rate). Enjoy the outdoors? You can't beat the
fishing, hunting, golfing, hiking and biking opportunities in Jackson
County. Do you prefer the adrenalin of watching sports live and in
action? Jackson is also home to the famous Jackson Speedway
(NASCAR/racing), and you can easily catch a Minnesota Vikings game or
visit the Mall of America with a quick trip north up to Minneapolis for
the day.
Show full article (2.56Kb)
1 Comment
  FAQ 4.32 How do I strip blank space from the beginning/end of a string?         


Author: PerlFAQ Server
Date: Dec 13, 2006 18:03

This is an excerpt from the latest version perlfaq4.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 .

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

4.32: How do I strip blank space from the beginning/end of a string?

(contributed by brian d foy)

A substitution can do this for you. For a single line, you want to
replace all the leading or trailing whitespace with nothing. You can do
that with a pair of substitutions.

s/^\s+//;
s/\s+$//;

You can also write that as a single substitution, although it turns out
the combined statement is slower than the separate ones. That might not
matter to you, though.

s/^\s+|\s+$//g;
Show full article (3.09Kb)
no comments

row1


row2


The snippet I wrote is

while( $HtmlSource =~ m{(.*)}sg ) {
my $r = $1;
print "found: $r\n";
}

But when I run this I get
found:
row1


row2
  question on processing HTML with a regex         


Author: cuneyt
Date: Dec 13, 2006 12:47

Hi,

I would like to process an HTML file in the form

Show full article (0.41Kb)
10 Comments
  FAQ 4.38 Why don't my <<HERE documents work?         


Author: PerlFAQ Server
Date: Dec 13, 2006 12:03

This is an excerpt from the latest version perlfaq4.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 .

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

4.38: Why don't my <
Check for these three things:

There must be no space after the << part.
There (probably) should be a semicolon at the end.
You can't (easily) have any space in front of the tag.

If you want to indent the text in the here document, you can do this:

# all in one
($VAR = < your text
goes here
HERE_TARGET

But the HERE_TARGET must still be flush against the margin. If you want
that indented also, you'll have to quote in the indentation.
Show full article (3.75Kb)
no comments
  number accuracy         


Author: kencavagnolo
Date: Dec 13, 2006 09:53

I was digging through some code this morning after encountering a
program error and I came across the following...

For this bit of code:
#-------------------------------------------------------#
$eta = 0.5;
$etacrit = 0.97;
while ($eta <= $etacrit) {
($eta < 0.80) ? ($etastep = 0.1) :
($eta < 0.95) ? ($etastep = 0.05) :
($etastep = 0.01);
$eta += $etastep;
}
#-------------------------------------------------------#
Show full article (1.68Kb)
6 Comments
  problem regarding function reference         


Author: vabby
Date: Dec 13, 2006 08:19

Hi
So this is my problem scenario. I have a main perl module, mod_main.pl,
and two other modules Batlib1.pm and Batlib2.pm .
In mod_main.pl I create an instance of Batlib2 :
$batlibobj2 = new_Batlib2 Batlib2();

And then an instance of Batlib1 where I pass the object of Batlib2.

$batlibobj1 = new_Batlib1 Batlib1($batlibobj2);

I then make a call to a test function fun1 in Batlib1.
$batlibobj1->fun1()

In my Batlib2.pm I have a simple test function fun2();

Inside Batlib1::fun1() , if I try to call Batlib2::fun2() by
$self->{batlibobj2}->fun2();
It works.

Also if I try to create a reference to the batlibobj2 ref and then call
fun2 the following way it still works:

my $refobj = \$self->{ batlibobj2};
$$refobj->fun2();

But when I try to create a reference to the function fun2 directly and
use it, perl starts cribbing.
Show full article (1.20Kb)
2 Comments
  Package name in Perl         


Author: iris.a.jackson
Date: Dec 13, 2006 06:08

Hi,

I am trying to find out how to create a variable in Perl whose value is
the name of the package it has been defined in. I haven't been able to
find the answer by Googling around.

Specifically, I'd like to be able to write Perl code like this:

=====
package My::Cool::Pkg;

our $name = $XXX;
=====

[obviously $XXX would be replaced by some funny-looking thing that I
still need to learn] and I'd like $name to be assigned 'My::Cool::Pkg'
when the file containing this is loaded. I would like to have this
available before any objects of class 'My::Cool::Pkg' are created.

Thank you!
7 Comments
  FAQ 4.34 How do I extract selected columns from a string?         


Author: PerlFAQ Server
Date: Dec 13, 2006 06:03

This is an excerpt from the latest version perlfaq4.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 .

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

4.34: How do I extract selected columns from a string?

(contributed by brian d foy)

If you know where the columns that contain the data, you can use
"substr" to extract a single column.

my $column = substr( $line, $start_column, $length );

You can use "split" if the columns are separated by whitespace or some
other delimiter, as long as whitespace or the delimiter cannot appear as
part of the data.

my $line = ' fred barney betty ';
my @columns = split /\s+/, $line;
# ( '', 'fred', 'barney', 'betty' );
Show full article (2.52Kb)
no comments
  Re: google and youtube script ( auto resume auto filename )         


Author: Scott Dorsey
Date: Dec 13, 2006 03:59

wrote:
>
>What happens when you need to download 211 episodes of Naruto?

You use a for/do loop in bash to call the script. However, you should not
hold the script author for the consequent brain damage that you get from
watching all that stuff.
--scott

--
"C'est un Nagra. C'est suisse, et tres, tres precis."
no comments
 
1 2