... 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...
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...
... 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...
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...
... 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...
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)...
... 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...
... 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>...
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...
... 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' ...
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...
... $#$refArr does work: my $foo = [ 1 .. 3 ]; print $#$foo; HTH, Charles K. Clarkson -- Head Bottle Washer, Clarkson Energy Homes, Inc. Mobile Home...
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...
@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...
... 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...
... 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...
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,...
... 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...
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...
... 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...
... 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...
... 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...
... 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....