... array when ... make a ... changes ... You can't look ahead or behind when using foreach. Use 'for' instead. for ( my $i = 0; $i < $#File; $i++ ) { if (...
16685
Jshynes40@...
Oct 1, 2003 6:19 pm
Hello, I have a folder on a network drive that has a couple of hundred files in it, here are some examples of filenames. This is on a WIN2000 machine, using...
16686
Electron One
thejoeshmoe
Oct 1, 2003 8:57 pm
Is there a way in perl to see if something matches, starting at a certain position? For example, lets say i had a function that had <String1>, <String2>, and ...
16687
Jeff Eggen
jeggen@...
Oct 1, 2003 9:14 pm
... certain ... and ... contained ... I think you could just use a single regex: if ( $String1 =~ m/^.{$start_at}$String2/ ) ... That seems to work. Hope this...
16688
Dan J. Rychlik
drychlik@...
Oct 1, 2003 9:43 pm
Hello, I have a program that I've written in perl thats about 2,000 lines of code. I really need to break this down into seperate files that easily...
16689
merlyn@...
merlynstoneh...
Oct 1, 2003 10:30 pm
... Jeff> and ... Jeff> contained ... Jeff> I think you could just use a single regex: Jeff> if ( $String1 =~ m/^.{$start_at}$String2/ ) Jeff> ... No, that'll...
16690
Jeff Eggen
jeggen@...
Oct 1, 2003 10:45 pm
... Jeff> I think you could just use a single regex: Jeff> if ( $String1 =~ m/^.{$start_at}$String2/ ) Jeff> ... ... { ... } Y'know, my first instinct was to...
16691
rosh_n_i
Oct 2, 2003 4:37 am
I want to know if there are any perl scripts available to convert TeX document into XML. All the codes available seem to have some configuration problem or the...
16692
Damien Carbery
daymobrew
Oct 2, 2003 10:14 am
... files in it, here are some examples of filenames. ... just this filename N (no extension, just the letter N, always captialized). I need to check for this...
16693
Lange Gunter, CH
gtigerl
Oct 2, 2003 1:52 pm
hi guys is there a way to remove elements from an array as I'm iterating through an array with foreach? Let say : foreach (@arr) { if (this condition is true)...
16694
Jeff 'japhy' ...
evilffej
Oct 2, 2003 2:19 pm
... That's a dangerous practice. You'll end up messing things up, because when you have an array like (a,b,c,d), if you're looking at element 'b' and you say...
16695
merlyn@...
merlynstoneh...
Oct 2, 2003 2:24 pm
... Lange> hi guys Lange> is there a way to remove elements from an array as I'm iterating through an Lange> array with foreach? Lange> Let say : Lange>...
16696
Lange Gunter, CH
gtigerl
Oct 2, 2003 2:30 pm
Thank you, Jeff! You are right! I wanted to do not only a dangerous but also a stupid practice. Before programming it seems to be good practice to switch on...
16697
merlyn@...
merlynstoneh...
Oct 2, 2003 2:54 pm
... Jeff> That's a dangerous practice. You'll end up messing things up, because Jeff> when you have an array like (a,b,c,d), if you're looking at element 'b' ...
16698
Lange Gunter, CH
gtigerl
Oct 2, 2003 3:09 pm
Please, let me ask another question! To get the element count of an array there you will use $#arr! But how to do it with a reference to an array? It is very...
16699
Charles K. Clarkson
charlesclarkson
Oct 2, 2003 3:37 pm
... $#$refArr does work: my $foo = [ 1 .. 3 ]; print $#$foo; HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home...
16700
Lange Gunter, CH
gtigerl
Oct 2, 2003 4:49 pm
Sorry, me again! I want to use a hash of arrays of arrays my code until now: while (<INPUT>) { my ($id, @rec)= split ';'; $refHash->{$id}= [@rec]; } My problem...
16701
merlyn@...
merlynstoneh...
Oct 2, 2003 5:18 pm
... Lange> my code until now: Lange> while (<INPUT>) { Lange> my ($id, @rec)= split ';'; Lange> $refHash->{$id}= [@rec]; Replace that...
16702
gl_bike2ride
Oct 2, 2003 7:35 pm
@Randall, thank you for the hint and for giving us Perl :) @all, for more information look into the Perl Cookbook, Chapter 5 "Hashes"; esp. 5.7. "Hashes with...
16703
merlyn@...
merlynstoneh...
Oct 3, 2003 3:24 am
... gl> @Randall, thank you for the hint and for giving us Perl :) Please... I gave you *writings* about Perl. Not Perl itself. That's Larry Wall. -- Randal...
16704
greg@...
kickstart70
Oct 3, 2003 6:42 am
... Ok, but you gave us the Schwartzian Transform, which is godlike :) How goes things, Randal? I chatted with you a while back on Perlmonks and you were most...
16705
Jadi
jadi@...
Oct 3, 2003 4:08 pm
Dear TKers, I have a question about TK. My code produces 2 labels and 2 entry fields. I'm trying to write a program which sets the second entry to "boy" if and...
16706
Electron One
thejoeshmoe
Oct 3, 2003 10:17 pm
How can you create a variable to be visible across multiple files? For example, File 1 contains a variable called $Joe, and in file 1 I call file 2 by saying,...
16707
merlyn@...
merlynstoneh...
Oct 3, 2003 10:28 pm
... Electron> How can you create a variable to be visible across multiple files? Electron> For example, File 1 contains a variable called $Joe, and in file 1 I...
16708
Scott
mike_nhl
Oct 4, 2003 6:09 pm
When I make a directory, I assume because I'm not a superuser that I can't make 0777 mkdir("/entry/$newdir", 0777); When it's made, it's 0755. Is there a way...
16709
Paul Archer
tigger@...
Oct 4, 2003 6:11 pm
You are specifying the permissions before the umask is applied. ('man umask' for more details) You should be able to change the permissions after the fact, or...
16710
merlyn@...
merlynstoneh...
Oct 4, 2003 6:12 pm
... Scott> When I make a directory, I assume because I'm not a superuser that I Scott> can't make 0777 Scott> mkdir("/entry/$newdir", 0777); Scott> When it's...
16711
Scott
mike_nhl
Oct 4, 2003 7:04 pm
... Your ... 777 0095 ... training! Forgive my newbie lack of knowing... I don't know umask, never heard of it. Here's my basic needs... I have a script that...
16712
merlyn@...
merlynstoneh...
Oct 4, 2003 7:47 pm
... Scott> I don't know umask, never heard of it. Can't say that any more. You've heard of it now. :) Scott> Here's my basic needs... I have Scott> a script...
16713
Scott
mike_nhl
Oct 5, 2003 6:16 am
... I used $old_umask = umask 0; mkdir("../path/$form{'newdir'}", 0755) or die "..."; umask $old_umask; and it works like a charm. Thanks for the script bits....