unicode question

2002-03-24 Thread birgit kellner
uestions, and a confused one as that - so apologies if this query is misdirected or, er, not particularly intelligible :-) best regards, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: $_ scoping

2002-02-25 Thread birgit kellner
--On Montag, 25. Februar 2002 10:24 -0900 Michael Fowler <[EMAIL PROTECTED]> wrote: > On Mon, Feb 25, 2002 at 07:45:30PM +0100, Birgit Kellner wrote: >> for (@array) { # contains a bunch of numbers >> my %hash = &get_record($_); >> } > Are you under the

Re: $_ scoping

2002-02-25 Thread birgit kellner
--On Montag, 25. Februar 2002 10:24 -0900 Michael Fowler <[EMAIL PROTECTED]> wrote: > On Mon, Feb 25, 2002 at 07:45:30PM +0100, Birgit Kellner wrote: >> for (@array) { # contains a bunch of numbers >> my %hash = &get_record($_); >> } > Are you under the

$_ scoping

2002-02-25 Thread Birgit Kellner
#end while close DB; return (%hash); } The line commented with "problem" now has the last value of $line from the subroutine get_record as $_, and no longer the original array element. Can it be that the subroutine somehow assigns something else to $_ and that this assignment is the

Re: sort on anonymous array elements as hash values

2002-02-08 Thread birgit kellner
Many thanks to Michael and the others who responded to this query! Needless to say: problem solved. Thanks again, Birgit Kellner --On Mittwoch, 06. Februar 2002 17:59 + Michael Lamertz <[EMAIL PROTECTED]> wrote: > > H, did I make sense? > > -- >

sort on anonymous array elements as hash values

2002-02-06 Thread birgit kellner
); Can I sort the hash on the second element of the anonymous array? Output should be: firstvaluetwo thirdvaluetwo valuetwoforsecondkey Many thanks in advance, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

regexp substitution problem

2002-01-14 Thread birgit kellner
t "QUERY\n-\n$query\n-\n"; $rec{'content'} =~ s/$query/!query!/s; print "CONTENT AFTER CHANGE: $rec{'content'}\n"; } Does anyone know why the substitution in the second line from the bottom is not carried out? Does

Re: regexp to replace double with single quotes inside html tags

2002-01-07 Thread birgit kellner
u have to pass a filename to it. I want to perform this routine on hash values inside a perl script, without having to write them to a file. Do you know of any parser that works without files? Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regexp to replace double with single quotes inside html tags

2002-01-06 Thread birgit kellner
s for the code, by the way. I think I can use it, even though there remains one case where it doesn't work: http://someimagefile.jpg"; alt="A > B"> That is, cases where tag attributes themselves contain pointed brackets (which is, AFAIK, legal). Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

regexps with multiple matches and extended ASCII characters

2002-01-04 Thread Birgit Kellner
# prints "Rita 1983! and then some text and here is !Künne 1234! and #!Kußmaul and 2001" Why does this not print the following: Rita and 1983 Künne and 1234 Kußmaul and 2001 And why is the regexp greedy with \C, but not with \w? Birgit Kellner -- To unsubscribe, e-mail: [EMAIL

alternate "require-s" in a script?

2002-01-01 Thread Birgit Kellner
I can switch from firstsetupfile.cgi to secondsetupfile.cgi, but not back. Any suggestions? If there's a better way to do this, other than using require's, I'd be more than glad to learn of it. Best regards, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

regexp to replace double with single quotes inside html tags

2001-12-30 Thread birgit kellner
{ my $var = $1; $string =~ s/$var"/$var'/;} print qq|$string\n|; The only case I found so far that it doesn't cover is when tag attributes themselves contain a ">"-character, like: http://someimage.gif"; alt="8 > 4">

Re: multiple image upload CGI/perl

2001-12-18 Thread birgit kellner
for images on submit, but isn't there a simpler, perl-ish solution? --On Donnerstag, 13. Dezember 2001 17:01 +0100 Birgit Kellner <[EMAIL PROTECTED]> wrote: > I'm trying to code a routine for uploading up to four images via a > CGI-form, using CGI.pm. > > Filenames incl

multiple image upload CGI/perl

2001-12-13 Thread Birgit Kellner
nted print OUTFILE $buffer;} close ($file); close (OUTFILE); print qq|BYTES read: $bytesread|;# no value for $bytesread } Suggestions? Thanks, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regexp extraction

2001-12-13 Thread Birgit Kellner
27;s interpolation and for especially \2 could be interpolated. > If I right remember it's an old version for $2 which have every value. > > Try, what happens when you use the q| ... | syntax instead of qq| ... |. > Exactly that was the problem! The code works fine with q| ... |.

regexp extraction

2001-12-11 Thread birgit kellner
" for the second? I thought of adding "\\|\/" in the regexp after "(.*?)", but then the first image is not extracted at all. Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

test - please ignore

2001-12-11 Thread birgit kellner
just checking whether the server still blocks my mail-server. Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CGI.pm problems continued

2001-11-21 Thread birgit kellner
double field name as value, and if the hash value of that field name contains "~~", return an error message. Anyway, many thanks for the advice, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: CGI.pm problems continued

2001-11-20 Thread birgit kellner
undefined\n"; > Sorry for being stubborn, but I' like to decode multivalued parameters *without* identifying them by name. That's precisely why reading multiple values into an array is not applicable. Is it possible that, when I do "my %in = $q->Vars" (should be "%i

CGI.pm problems continued

2001-11-19 Thread birgit kellner
} return(%in); } Any ideas why the deletion doesn't work in the first "parse_form" subroutine? Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: capture strings with two non-identical capital letters in a row

2001-11-19 Thread birgit kellner
--On Sonntag, 18. November 2001 17:31 -0900 Michael Fowler <[EMAIL PROTECTED]> wrote: > On Fri, Nov 16, 2001 at 10:39:57PM +0100, birgit kellner wrote: >> How can I filter out strings which contain two (or three) non-identical >> capital letters in a row? >> >

CGI.pm questions

2001-11-17 Thread birgit kellner
he list or alternatively, if the item does not occur in the list, enter a new value. What the parse_form *should* do is ignore names without values from the start, and not read them into @names and *then* check whether they have values. Thanks a lot for any advice, Birgit Kellner -- To unsub

capture strings with two non-identical capital letters in a row

2001-11-16 Thread birgit kellner
How can I filter out strings which contain two (or three) non-identical capital letters in a row? my $string1 = "ABCD"; my $string2 = "AbCd"; my $string3 = "AABcD"; Get $string1, discard $string2 and $string2. Birgit Kellner -- To unsubscribe, e-mail: [E

Re: Regulare Expressions/ Substitution Question

2001-11-15 Thread birgit kellner
ething like: > > $item = "35 Main St." (it could also be "35 Main St" in which case I want > the substitution to happen) > > $varS = "st"; > $item =~ s/\b$varS(^.|\W)\b/St./gi; > if ($item =~ /\b(st)\b/i) { $item =~ s/$1/St\./g;} Birgit Kellner

RE: regexp

2001-11-15 Thread birgit kellner
--On Mittwoch, 14. November 2001 09:44 -0800 Wagner-David <[EMAIL PROTECTED]> wrote: > So given your new data, I am unsure what data would be placed in the > hash. From your example, what is expected? > > Wags ;) > In %Authorhash, a main heading should be assigned to the heading number (

RE: regexp

2001-11-14 Thread birgit kellner
t; after the end of that line - if so, assign everything in between the end of that line and "1\.1\.\s." as a hash value, and move up the counter to 2; if not, move up the counter to 2 and search for a line beginning with "2\.\s" *after* "1\.1\.\s". " Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

regexp

2001-11-13 Thread birgit kellner
this necessarily involve slurping the whole file into an array first? Thanks in advance for any advice, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: why does this loop not continue?

2001-11-09 Thread birgit kellner
--On Donnerstag, 08. November 2001 19:50 -0500 Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Nov 9, birgit kellner said: > >> for ($i = 0; $i < @inputarray; $i++) { > > You use $i here... > > And here. That's bad. > > Either use di

why does this loop not continue?

2001-11-08 Thread birgit kellner
\n";#checking Output: foo bat baz - foo bar baz burp -- identical! not identical: bat and bar match b and b match a and a relevance: 2 percent of letters in same position: 66.7 100 66.7 RELEVANCE: 83.3 Problem: The loop should g

script for internal site link checks

2001-11-03 Thread birgit kellner
ame and replace it with $new_file_name, but most links are relative, and ... well, before I think further along that path, has anyone else? Thanks in advance, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: Flat File

2001-10-28 Thread birgit kellner
rray[$phone_pos]; } } close (FILE); foreach my $key (keys %city_and_phone) { print "$key: $city_and_phone{$key}\n"; } Not tested, but I've been using code like this a lot lately. Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

module and logicistics advice, please

2001-10-28 Thread birgit kellner
al { ... require "$db_setup.cfg"; } ... #now I can use $db_file_name Or could/should I use "our" instead of "use vars" for (a) initializing variables which will then be filled be requiring $db_setup.cfg and/or (b) initializing variables which will then be expo

either or

2001-10-23 Thread birgit kellner
(i.e. excluxive or) on strings would best be done with "xor". Is that correct? thanks, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: File::Path oddity

2001-10-19 Thread birgit kellner
--On Freitag, 19. Oktober 2001 12:26 -0700 Luke Bakken <[EMAIL PROTECTED]> wrote: > is your umask 022? > > exactly. Thanks to you and Bob for the hint, Birgit -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

File::Path oddity

2001-10-19 Thread birgit kellner
permissions to 777, using the following code, it doesn't work: mkpath(["$newdir"], 0, 0777); Any explanations? Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: regexp question

2001-10-19 Thread birgit kellner
--On Freitag, 19. Oktober 2001 12:49 -0400 Jeff 'japhy' Pinyan <[EMAIL PROTECTED]> wrote: > On Oct 19, birgit kellner said: > >> my $header = "Joe DoeThe book I wrote yesterday"; >> my $title; >> if ($header =~ /(^\S.+)()(\S.+$)/m) { $title

regexp question

2001-10-19 Thread birgit kellner
py the value of a variable and then run a regexp substitution on it; I was wondering whether there's a better approach than this one. Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: display on words containing the letter p

2001-10-05 Thread birgit kellner
while () { my @words = split / /;#assumes words in line are separated by a single space foreach my $word (@words) { if ($word =~ /p/) { print "$word\n"; } } } close (FILE); Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

working on site/scripts offline

2001-10-05 Thread birgit kellner
nal directory while resetting directory parameters. I was wondering whether there are any modules for this particular purpose, or whether anyone has done something similar and can point me to some relevant resources. Thanks, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: logic question

2001-10-01 Thread birgit kellner
f $regexp_func[$field] as its name is called? Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: separating an array into sets of n elements

2001-09-26 Thread birgit kellner
carry out a search operation and check for duplicate values in one particular field". I am taking note of simpler large-scale approaches for eventual future re-coding of the entire script, so your suggestsion to pass array references rather than arrays has been duly taken note of. But I cannot implement it at the present stage, due to competence and also time restrictions. Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

separating an array into sets of n elements

2001-09-25 Thread birgit kellner
example, that would be "is". I guess the first step to do would be to separate @hitsarray in sets of four elements (how? loop sliceing?), code these sets as arrays and check whether $array[$searchposition] of one such array is identical to that of another. Or is there a more effici

remove last n elements from array and return the rest

2001-09-24 Thread birgit kellner
st $delete_last_elements elements\n"; foreach (@searchwords) {print "$_\n";} Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: searching file for presence of ALL values of a hash when thehash key is the position of the value on the file's line

2001-09-24 Thread Birgit Kellner
if ($found == scalar keys %searchhash) { #when there are as many matches as hash elements, grab the line, otherwise just move on push (@hits, \@line);} } } close (FILE); foreach my $hit (@hits) { print "HIT: ", join("|", @$hit), "\n"; } Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: store index numbers of all array1 elements in array2 whichequalkeys in a hash

2001-09-23 Thread birgit kellner
--On Samstag, 22. September 2001 12:26 -0800 Michael Fowler <[EMAIL PROTECTED]> wrote: > On Sat, Sep 22, 2001 at 03:27:01AM +0200, birgit kellner wrote: >> --On Samstag, 22. September 2001 01:09 +0200 Andrea Holstein >> > Simple solution is >> > ... >> &g

searching file for presence of ALL values of a hash when the hashkey is the position of the value on the file's line

2001-09-22 Thread Birgit Kellner
15|vienna #miller|32|copenhagen # Neither does it work for: #somestuff|15|copenhagen #kellner|15|vienna #miller|32|copenhagen #miller|32|copenhagen #For these two files, I only get one hit back. Any clues? # Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: store index numbers of all array1 elements in array2 whichequalkeys in a hash

2001-09-21 Thread birgit kellner
--On Samstag, 22. September 2001 01:09 +0200 Andrea Holstein <[EMAIL PROTECTED]> wrote: > Birgit Kellner wrote: >> >> my %hash = ('firstkey' => 'firstvalue', >> 'secondkey' => 'secondvalue', >> &#

store index numbers of all array1 elements in array2 which equalkeys in a hash

2001-09-21 Thread birgit kellner
y'); my @index_array; foreach my $element (@array) { # QUESTION: here I'd like to have some code that returns the index number of $element, which I'd store in $index if ($hash{$element}) { push (@index_array, $index); } } Any su

generation of individual ANSI characters in RTF via perl?

2001-08-25 Thread Birgit Kellner
ANSI characters I am using are not part of one consistent language specification or covered by one particular code-set. I have to directly access their values. I realize that this is probably more of an RTF question, but thought to ask here first as the RTF-file is generated via a perl module and as there might just be some steps in perl that I'm missing out on. Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

hash key with regexp - thanks & further question

2001-08-24 Thread Birgit Kellner
above code is what I want it to be: the value for the key "A" from that particular hash to which the scalar $array refers - it would be the value for the key "A" in %array, which doesn't exist in my script. But how can I turn it into what I want it to be? Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: is this sub called correctly? am I missing something?

2001-08-24 Thread Birgit Kellner
-mail and edited the mail. Guess use strict won't prevent that from happening :-) Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

test presence of hash key with regexp?

2001-08-24 Thread Birgit Kellner
Is it possible to test the presence of a hash key with a regexp? something like: if (exists ($hash{/add_\w+/})) { print "yippie!\n";} I know that this doesn't work, but is there something similar that does? Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For addi

Re: is this sub called correctly? am I missing something?

2001-08-24 Thread Birgit Kellner
he sub is called before (OK) or after another sub (doesn't work), even though that other sub does not do anything with the database file or manipulate values accessed by this sub. Very puzzling. Sorry if I'm not providing enough information, but it is difficult for me to figure out what

RE: is this sub called correctly? am I missing something?

2001-08-23 Thread Birgit Kellner
--On Donnerstag, 23. August 2001 13:01 -0500 "Daryl J. Hoyt" <[EMAIL PROTECTED]> wrote: > I do not believe that you need the "&" before the function call. I thought so, but leaving it out doesn't solve my problem either. - But thanks anyway. Birgit

is this sub called correctly? am I missing something?

2001-08-23 Thread Birgit Kellner
$rec{$db_cols[$i]} = $data[$i]; } last LINE; } } close DB; $found ? (return %rec) : (return undef); } I'd be really grateful for any hints as

RTF Generator vs. RTF Writer?

2001-08-23 Thread Birgit Kellner
are two such modules: RTF-Generator-1.00 and RTF-Writer-1.06. Does anyone on this list use these modules and can share experiences? Thanks & regards, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

finding a key in a hash with regexp

2001-08-12 Thread Birgit Kellner
$key(keys %hash) { if ($key =~ /^\d/) {push (@keys, $key); } } But since I know there will only be one key where this condition is true, looping and creating an array seems like a waste. Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

variable scope over multiple files

2001-08-10 Thread Birgit Kellner
stion is: If I have one script that requires another and I want to make the former's global variables available in the latter, and have use strict NOT complain, what should I do? Perhaps I should not use "require", but "use"? Birgit Kellner -- To unsubscribe, e-

problems with a for-loop

2001-08-09 Thread Birgit Kellner
m in db2.db, and it gets returned in @hits2. In the second loop, $firstname = "Sandra" and $lastname = "Kwack" are returned. There's also a match for them in db2.db, but it doesn't get returned as @hits2 - @hits2 stays with good old Charles Miller. Second, I get the

RE: on returning subroutine arguments

2001-08-09 Thread Birgit Kellner
thanks - I had foolishly assumed that if sub_one does something else apart from generating $returnedValue, like printing out html, it would not do that if I simply called it by assigning its return argument to a variable. Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For add

on returning subroutine arguments

2001-08-09 Thread Birgit Kellner
n code like this: ## main code # my ($numhits, @hits) = @_; for (0 .. $numhits - 1) { &sub_one(&array_to_hash($_, @hits)); my $value = $_[0]; # is $_[0] here the return argument from sub_one? } end main code Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: how to matching pattern of a scalar?

2001-08-06 Thread Birgit Kellner
d not by backward ones \. So, for instance, to find out whether a variable contains "gobbledy", you'd write: if ($variable =~ /gobbledy/) ... Do "perldoc perlequick" to get the "Perl regular expressions quick start" manpage, and "perldoc perlretut" for a

Re: Some Extremely Clueless Questions!

2001-08-05 Thread Birgit Kellner
ersions of NoteTab. Current releases have Perl and Gawk support built in also in the freeware version. birgit kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: passing values to sub

2001-08-05 Thread Birgit Kellner
--On Sonntag, 05. August 2001 22:33 +0200 Paul Johnson <[EMAIL PROTECTED]> wrote: > > sub sonic > { > my ($numhits, $maxhits, @hits) = @_; > ... > } > sub genius { print "thank you"; } Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTE

Re: passing values to sub

2001-08-05 Thread Birgit Kellner
--On Sonntag, 05. August 2001 19:51 +0200 Paul Johnson <[EMAIL PROTECTED]> wrote: > On Sun, Aug 05, 2001 at 07:27:25PM +0200, Birgit Kellner wrote: >> I have two files called html.pl and config.pl, both of which require >> each other. >> >> The subroutine &

passing values to sub

2001-08-05 Thread Birgit Kellner
er, is why they were originally declared as private variables). Many thanks in advance, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: Some Extremely Clueless Questions!

2001-08-05 Thread Birgit Kellner
> On Sunday 05 August 2001 8:01 am, [EMAIL PROTECTED] wrote: >> Hello, >> 1) How exactly do I edit a script? In Word and then change it to a .pl >> file? Do I have to change file types back and forth every time I change >> the script? >> A program that I found quite useful for writing and edi

Re: read query string with multiple instances of name/values intohash

2001-07-31 Thread Birgit Kellner
} } The regexps in the second if-condition should specify that (a) the name in the query-string is numerical, and that (b) it has a numeric value (we exclude cases where silly users write words into the copies-field) other than 0 (i.e. one that does not start with zero). For all I can tell, this works. Any ideas for further simplification? Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

read query string with multiple instances of name/values into hash

2001-07-30 Thread Birgit Kellner
ke to understand why that is the case. Just in case a user mistakenly types "0" for a book they don't want to order, I thought I'd add the following code to remove all key/value pairs from the hash where the value is zero: foreach $key (keys %pairs) { if ($pairs{$key} == 0) { delete @pairs{"$key", "$pairs{$key}"}; } } Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

read query string with multiple values for same name?

2001-07-29 Thread Birgit Kellner
uot; I am using CGI.pm and would now like to parse the query-string such that each value of "thisorder" is associated with the immediately following value of "key". I reckon this means I should create a hash. Could anyone point me in the right direction on how to achieve thi

Re: how to get an array index number

2001-07-26 Thread Birgit Kellner
--On Donnerstag, 26. Juli 2001 04:15 +0200 Birgit Kellner <[EMAIL PROTECTED]> wrote: > Hi, > > I'm thinking of coding a KWIC search through a text. The user chooses a > search string and a horizon, meaning that output is to contain $i words > to the left and to the

how to get an array index number

2001-07-25 Thread Birgit Kellner
uot;making" as $searchstring, the print statement returns: "index value of making is 0. index value of making is 1. index value of making is 2. index value of making is 3. index value of making is 4. index value of making is 5. index value of making is 6." Help will be greatly app

Re: file copy and create directory if necessary

2001-07-25 Thread Birgit Kellner
a problem if the > directory already exists, so you don't need to check it. > Thanks for clarifying that, Birgit Kellner -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: file copy and create directory if necessary

2001-07-25 Thread Birgit Kellner
dir holds "/home/somedir" and $2 holds "/anotherdir/yetanotherdir/"; So, to check if the dir /home/somedir/anotherdir/yetanotherdir exists, I would use: chop($2); # remove final trailing slash $subdir = "$admindir$2"; unless (-e "$subdir") { mkpa

file copy and create directory if necessary

2001-07-25 Thread Birgit Kellner
to add the requirement "if the subdirectory does not yet exist, create it?" TIA, Birgit Kellner ### first we find all files in all subdirectories of directory "$origdir" which end in *.html and ### push them into an array $origdir = "original directory which contai