Re: deleting elements of an array and push into new

2003-01-03 Thread Shawn B
- Original Message - From: "Ramprasad" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, January 03, 2003 1:48 AM Subject: deleting elements of an array and push into new > Hello all, > I have to remove elements from an array if they match a particualr > string and put it i

Re: macthing question...

2002-12-30 Thread Shawn B
- Original Message - From: "Mike Burnard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 30, 2002 11:40 PM Subject: macthing question... > Hi, > > I'm in the midst of writing my first useful perl script. It's designed to > pull text out of a plain text file and wri

Re: Regexp with //x

2002-12-30 Thread Shawn B
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 30, 2002 11:36 PM Subject: Regexp with //x > > Can anyone tell me where to find out what the x does when used at the end > of a pattern match? (i.e. $tag =~ /abc/x) Everywhere I've looked gi

Re: split error

2002-12-28 Thread Shawn B
[snip] > On FreeBSD, I get: > > % perl -e 'use bytes; for(0..256) { $s.=chr($_) } for(split(//,$s)) { print }' > > > > >!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ > >¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍ

Re: split error

2002-12-28 Thread Shawn B
»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿA- Shawn > > Hope this helps in some way... > > http://danconia.org > > > Rob Dixon wrote: > > Hi Shawn > > > > I'll stick my neck out and say that this is a bug in Perl, to do with >

split error

2002-12-28 Thread Shawn B
Hello all, Can anyone explain why this fails? I have done a google search for 'Split loop at', and turned up nothing. If the initial array stays under 256, all is fine, but anything beyond 255 (as far as I have tested) dies. Is this something to do with bit size? %perl -e 'for(0..256) { $s.

@array to %hash

2002-11-20 Thread Fogle Cpl Shawn B
I have 2 arrays I would like to make into a (one) hash. One array for keys. One array for values. I'm sure this may be an easy thing, but my lack of imagination is killing me (and I need something a little more comprehensive than Beginners Perl) tia shawn -- To unsubscribe, e-mail: [EMAIL PRO

File::Find cache?

2002-11-11 Thread Fogle Cpl Shawn B
Does File::Find cache itself to memory even after the script has been completed? I've put a script together that is going to find ~1785 files in 30 directories.. The First time I try my script after computer's turned on... real0m14.972s user0m0.410s sys 0m0.270s and the second time ~

Using non-standard characters...

2002-10-23 Thread Fogle Cpl Shawn B
Sorry about the incorrect syntax's, I'll put a little more time into preparing my question before I send out another one. The problem is now fixed though. Thanks for your help, shawn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Using non-standard characters...

2002-10-22 Thread Fogle Cpl Shawn B
ky.cz] Sent: Monday, October 21, 2002 11:50 PM To: [EMAIL PROTECTED] Subject: Re: Using non-standard characters... From: Fogle Cpl Shawn B <[EMAIL PROTECTED]> > I'm having a little problem with some of my filenames that have ' in > them (I would enclose it in quo

Using non-standard characters...

2002-10-21 Thread Fogle Cpl Shawn B
I'm having a little problem with some of my filenames that have ' in them (I would enclose it in quotes but that would probably confuse things). And it never makes it beyond that point in the filename when running the script. I have thought of makeing a link to a temp file with a better name (some

Couple of qustions...

2002-10-16 Thread Fogle Cpl Shawn B
How would I go about going to a previous line? I would also like to do several regexp's against a scalar value...something like this (hopefully you know a way for me to make this shorter!) $next_music_file =~ s/[.]/ /; $next_music_file =~ s/^[0]//; $next_music_file =~ s/.flac//; $next_music_fil

Segfaults

2002-10-12 Thread Fogle Cpl Shawn B
When I make perl segfault due to something stupid I did should I just ignore it or report it as a bug? (yes I can reproduce it) thanks shawn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Perl regexp tutorial?

2002-10-08 Thread Fogle Cpl Shawn B
Can anyone point me to a regexp tutorial (or manpage for that matter). I can't seem to find good information that's too indepth on the subject (and some of you guys look like regexp wizards). thanks, shawn -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROT

RE: Wanna Help?

2002-10-07 Thread Fogle Cpl Shawn B
sub random { my $music_phile = $_[rand @_]; } # The @$ is used to get to the array from the array reference that is # passed into the sub. I will explain the code as given in # perldoc -q shuffle sub fisher_yates_shuffle { my $deck = shift; # $deck is a reference to an array my $i = @

Wanna help?

2002-10-07 Thread Fogle Cpl Shawn B
I created a simple little program to play my flac files (see http://flac.sf.net) randomly, this is my first program of any time to take it easy on me (and I know I'm not too stylish, and I love one liners). The problem is that when I play the files, I want it to go through the whole array @music_l

Quit with keystroke?

2002-09-06 Thread Fogle Cpl Shawn B
I'm writing my first perl script with the llama (the beginner o'riley book) but the one thing I need to make a complete program that I don't see in the book or the perl faqs (although I'd bet it's there somewhere) is a acceptable way to cause the script to terminate. I have been having to goto ano