comp.lang.perl.misc
  Home FAQ Contact Sign in
Your Ad Here
comp.lang.perl.misc only
 
Advanced search
May 2008
motuwethfrsasuw
   1234 18
567891011 19
12131415161718 20
19202122232425 21
262728293031  22
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
  implementation for Parsing Expression Grammar?         


Author: xahlee
Date: May 9, 2008 22:52

In the past weeks i've been thinking over the problem on the practical
problems of regex in its matching power. For example, often it can't
be used to match anything of nested nature, even the most simple
nesting. It can't be used to match any simple grammar expressed by
BNF. Some rather very regular and simple languages such as XML, or
even url, email address, are not specified as a regex. (there exist
regex that are pages long that tried to match email address though)

I wrote out a more elaborate account of my thoughts here:
http://xahlee.org/cmaci/notation/pattern_matching_vs_pattern_spec.html

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

After days of researching this problem, looking into parsers and its
theories etc, today i found the answer!!

What i was looking for is called Parsing Expression Grammar (PEG).

See
http://en.wikipedia.org/wiki/Parsing_expression_grammar

It seems to me it's already in Perl6, and there's also a
implementation in Haskell. Is the perl6 PEG is in a usable state?

Thanks.
Show full article (1.05Kb)
6 Comments
  Help: Content extraction         


Author: Amy Lee
Date: May 9, 2008 19:30

Hello,

I have a problem while I'm processing my sequence file. The file content
is like this.
>seq1
ACGGTC
ACTG
>seq2
CGATCC
ACCTC
>seq3
......
Show full article (0.60Kb)
8 Comments
  Getting Portocal Settings for NIC         


Author: Cosmic Cruizer
Date: May 9, 2008 18:50

I'm trying to get the protocal settings only on the active NICs on a
computer.

I'm using $nics = $objWMIService->ExecQuery
('SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled =
True'); to get the active NICs, but how can I feed the NIC info into the
following:

$colItems = $objWMIService->ExecQuery
("SELECT * FROM Win32_NetworkProtocol","WQL",wbemFlagReturnImmediately
| wbemFlagForwardOnly);

Using Win32_NetworkProtocol, all i can figure out how to do is print out a
list of all the drivers and I'm not seeing how to get that info out of
Win32_NetworkAdapterConfiguration.

Ideally, I would like to list the NIC configuration along with the
corresponding protocals for that NIC.

Thanks.
no comments
  How to filter fat32 illegal characters from directories and files?         


Author: nospam
Date: May 9, 2008 18:31

These are illegal characters in a fat32 file system:

/ : ; * ? " < > |

So when I attempt to copy files which contain any of these characters to
my USB thumb drive which is a fat32 file system, it fails. I don't want
to format the thumb drive as anything else. Is there a script which will
traverse directories and files and strip these characters? I've google'd
groups and the web and can't seem to find anything! I don't want to
reinvent the wheel, but it looks as though I might have to. I'm
attempting this with a shell script, but having difficulties when
traversing sub-directories. Any examples would be appreciated too!

-Thanks
2 Comments
  Protect yourself against Operation Sudden Fall         


Author: Elizabeth.Seiwell
Date: May 9, 2008 18:05

Law enforcement is now intercepting text messages,
as proven by Operation Sudden Fall in San Diego.

http://www.usdoj.gov/dea/pubs/states/newsrel/sd050608.html
http://www.signonsandiego.com/news/education/20080506-1338-bn06sdsu2.html

Don't let your personal SMS/text messages fall into
the wrong hands. Encrypt your messages with one
of these:

http://www.CryptoSMS.org
http://www.CryptoSMS.com
http://www.FortressMail.net/fortress_sms.htm
http://www.Cop2p.com/encrypted_sms.html

Be Safe, Be Encrypted, Fuck the Police!!

--
You won't climb me conforming about your medieval rear.
no comments
  FAQ 3.24 Why don't Perl one-liners work on my DOS/Mac/VMS system?         


Author: PerlFAQ Server
Date: May 9, 2008 18:03

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

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

3.24: Why don't Perl one-liners work on my DOS/Mac/VMS system?

The problem is usually that the command interpreters on those systems
have rather different ideas about quoting than the Unix shells under
which the one-liners were created. On some systems, you may have to
change single-quotes to double ones, which you must *NOT* do on Unix or
Plan9 systems. You might also have to change a single %% to a %%%%.

For example:

# Unix (including Mac OS X)
perl -e 'print "Hello world\n"'

# DOS, etc.
perl -e "print \"Hello world\n\""
Show full article (2.64Kb)
no comments
  defend against Operation Sudden Fall         


Author: Joie.Rosettie
Date: May 9, 2008 17:27

Law enforcement is now intercepting text messages,
as proven by Operation Sudden Fall in San Diego.

http://www.usdoj.gov/dea/pubs/states/newsrel/sd050608.html
http://www.signonsandiego.com/news/education/20080506-1338-bn06sdsu2.html

Don't let your personal SMS/text messages fall into
the wrong hands. Encrypt your messages with one
of these:

http://www.CryptoSMS.org
http://www.CryptoSMS.com
http://www.FortressMail.net/fortress_sms.htm
http://www.Cop2p.com/encrypted_sms.html

Be Safe, Be Encrypted, Fuck the Police!!

--
As faster as Founasse frames, you can mention the morale much more reportedly.
no comments
  BEST VIDEO sex!         


Author: ddda
Date: May 9, 2008 14:55

no comments
  FAQ 4.19 How do I validate input?         


Author: PerlFAQ Server
Date: May 9, 2008 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.19: How do I validate input?

(contributed by brian d foy)

There are many ways to ensure that values are what you expect or want to
accept. Besides the specific examples that we cover in the perlfaq, you
can also look at the modules with "Assert" and "Validate" in their
names, along with other modules such as "Regexp::Common".

Some modules have validation for particular types of input, such as
"Business::ISBN", "Business::CreditCard", "Email::Valid", and
"Data::Validate::IP".

--------------------------------------------------------------------
Show full article (1.49Kb)
no comments
Your Ad Here
  I need to extract an array from a scalar regex-wise ?         


Author: advice please wireless 802.11 on RH8
Date: May 9, 2008 11:22

This is not a homework assignment. I'd be interested in more elegante'
solutions than mine is all..

Let's say I want to extract all of the days of the week out of a
scalar such as :

$_ =
'We went to the beach on Monday but it turned out that Sunday would
have been better. The weather report Saturday said no rain until
Thursday but I asked Tuesday (a trick!) and she said it rained
Wednesday.'

I want a regex/map/grep/etc (no iterative clauses PLEASE!) that
yields:

@days = qw( Monday Sunday Saturday Thursday Tuesday Wednesday )

My best shot is:
my @days = keys %%{ /((mon|tues|wednes|thurs|fri|satur|sun)day)/gi };

Which, oddly, doesn't seem to work. I say "oddly", because

/((mon|tues|wednes|thurs|fri|satur|sun)day)/gi

=
Show full article (1.04Kb)
11 Comments
1 2