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
  FAQ 6.22 How can I match strings with multibyte characters?         


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

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

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

6.22: How can I match strings with multibyte characters?

Starting from Perl 5.6 Perl has had some level of multibyte character
support. Perl 5.8 or later is recommended. Supported multibyte character
repertoires include Unicode, and legacy encodings through the Encode
module. See perluniintro, perlunicode, and Encode.

If you are stuck with older Perls, you can do Unicode with the
"Unicode::String" module, and character conversions using the
"Unicode::Map8" and "Unicode::Map" modules. If you are using Japanese
encodings, you might try using the jperl 5.005_03.

Finally, the following set of approaches was offered by Jeffrey Friedl,
whose article in issue #5 of The Perl Journal talks about this very
matter.
Show full article (3.83Kb)
no comments
  Count differences between arrays         


Author: Steve
Date: Jan 7, 2008 08:44

Hi all,

I'm trying to count occurrences of elements in array1 that aren't in
array2. Currently I'm doing this by converting one array to a hash and
using 'exists':-

my %%foo;
my $score = 0;
@foo{@array2} = (); # Convert array to hash (for exists)
for (@array1) { $score++ unless exists $foo{$_} };

Whilst this seems to work I'm sure there's a more efficient method.

Any suggestions?

Thanks

--
pub 1024D/228761E7 2003-06-04 Steven Crook
Key fingerprint = 1CD9 95E1 E9CE 80D6 C885 B7EB B471 80D5 2287 61E7
uid Steven Crook mixmin.net>
6 Comments
  syswrite "Bad file descriptor" after successfully writing to that file handle         


Author: Robert Jacobson
Date: Jan 7, 2008 07:31

I'm having some trouble figuring out an error that I'm getting.
syswrite is failing to write; $! is "Bad file descriptor". What
boggles my mind is that this is after some data had already been
written successfully to the file handle!

This problem seems to be linked to a recent change I made to my
program. My program is basically a network socket data collector,
running on Windows with ActivePerl 5.8.8 (build 819)

- open data file (sysopen)
- connect to server socket
- while read from server socket OK
- write data to file
- if X time elapsed:
- close file
- open new file

I recently changed my program to add "use threads", and add a
conversion program in that thread
Show full article (1.40Kb)
2 Comments
  Hacking yahoo         


Author: don
Date: Jan 7, 2008 06:16

http://www.softwarespt.blogspot.com/

This is the site which gives whole information about hacking tricks
and tips .you cant get the information about yahoo hacking.But this
site gives many methods to hack yahoo and gmail.Just refer the below
links.

http://softwarespt.blogspot.com/2007/12/hacking-passwords-through-picture-using....

http://softwarespt.blogspot.com/2007/12/hacking-tricks.html
no comments
  FAQ 7.25 Why can't a method included in this same file be found?         


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

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

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

7.25: Why can't a method included in this same file be found?

Some possible reasons: your inheritance is getting confused, you've
misspelled the method name, or the object is of the wrong type. Check
out perltoot for details about any of the above cases. You may also use
"print ref($object)" to find out the class $object was blessed into.

Another possible reason for problems is because you've used the indirect
object syntax (eg, "find Guru "Samy"") on a class name before Perl has
seen that such a package exists. It's wisest to make sure your packages
are all defined before you start using them, which will be taken care of
if you use the "use" statement instead of "require". If not, make sure
to use arrow notation (eg., "Guru->find("Samy")") instead. Object
notation is explained in perlobj.
Show full article (1.94Kb)
no comments
  mod_perl -> Can't enable PerlResponseHandler in <Location>         


Author: r3gis
Date: Jan 7, 2008 05:17

Hi ,

I have been trying to enable PerlResponseHandler in the start > directive of my VirtualHost ...but for some reason it doesn't
work ...

I really cant understand why it does i if I put it directly to the
VirtualHost ... I would be very greatful if someone could explain this
to me .

This is my apache configuration :
[ If I go to the http://bookshelf/ everything works great... on the
other hand I dont get anything in the http://bookshelf/start ( Just
blank page with few basic headers ).

Show full article (1.04Kb)
no comments
  E-classifieds review         


Author: auction
Date: Jan 7, 2008 03:25

With AJ Classifieds, you can build and brand your own classifieds site
customized to the unique needs of your market, whether it's for
consumers or other businesses.

Sources: http://www.ajclassifieds.net/features.php
no comments
  FAQ 7.4 How do I skip some return values?         


Author: PerlFAQ Server
Date: Jan 7, 2008 00:03

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

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

7.4: How do I skip some return values?

One way is to treat the return values as a list and index into it:

$dir = (getpwnam($user))[7];

Another way is to use undef as an element on the left-hand-side:

($dev, $ino, undef, undef, $uid, $gid) = stat($file);

You can also use a list slice to select only the elements that you need:

($dev, $ino, $uid, $gid) = ( stat($file) )[0,1,4,5];

--------------------------------------------------------------------
Show full article (1.41Kb)
no comments