Hi Martin,
> I feel embarrassed for wasting everybody's time, but I
> really appreciate the help.
sometimes one needs to think out loud to solve a problem. I had a lot of
problems like this one where it helped to get feedback from this list.
Regards,
Jan
--
Paranoia i
Hi Martin,
> I feel embarrassed for wasting everybody's time, but I
> really appreciate the help.
sometimes one needs to think out loud to solve a problem. I had a lot of
problems like this one where it helped to get feedback from this list.
Regards,
Jan
--
Paranoia i
rl -pi.bak -e "s/oneThing/otherThing/g" yourFile
This creates a backup named "yourFile.bak" prior to processing yourFile.
> hang or not ?
I have processed files > 2G this way, no problems encountered.
Regards,
Jan
--
When a woman marries again it is because she detested he
workspace in eclipse? Or - most likely :) - sth else?
I have to admit I am a bit clueless and would be thankful for any hints on
how to debug an existing, full-fledged PERL web application.
Thx a ton and grtz,
Jan
> out of the Wenger Giant:
>
> http://www.campist.com/archives/wenger-giant-swiss-army-knife.html
>
> HTH,
>
> -- j
Hello all,
Try the term "Schweizer Sackmesser" in google and check the pictures.
It is actually a knife, not a chainsaw :).
Cya
Jan
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
On 29 Jul., 17:40, [EMAIL PROTECTED] (Paul Lalli) wrote:
> On Jul 29, 8:46 am, [EMAIL PROTECTED] (Jan-Henrik) wrote:
>
> > I'm new to Perl and I have a simple question:
>
> Yes, but unfortunately it doesn't have a simple answer :-/
>
> >
On 29 juil, 17:40, [EMAIL PROTECTED] (Paul Lalli) wrote:
> On Jul 29, 8:46 am, [EMAIL PROTECTED] (Jan-Henrik) wrote:
>
> > I'm new to Perl and I have a simple question:
>
> Yes, but unfortunately it doesn't have a simple answer :-/
>
> >
On 29 juil, 14:46, [EMAIL PROTECTED] (Jan-Henrik) wrote:
> Dear Group,
>
> I'm new to Perl and I have a simple question:
>
> I ask for the entry of a number vie :
>
>
> #!/usr/bin/perl -w
> use strict;
>
> my
e beautiful way?
Also, how would I substract just a number from a string? Searched the
net for an example but didn't succeed, so sorry for asking a question
like that...
Many thanks for your help!
Kind regards,
Jan-Henrik
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comm
Well it's AFAIK ;)
As Far As I Know
Jan Chorowski
On Mon, 24 Sep 2007 22:11:44 +0530
Somu <[EMAIL PROTECTED]> wrote:
> What does it mean? AFAIK? I have seeing it a lot.. Earlier i've been
> seeing the HTH, and a guess gave the answer.. But this one, AFAIK...
> Are
Hi,
I can't understand why the following regexp matches. It was part of a
larger program transformig c++ files:
When running:
#!/usr/bin/perl
"dummy dummy { ;" =~
m{(
^(
[^;{}]
(?> #<--- disable backtracking
(\s|\\\n)* # treat escaped \n as space
(// ([^
ache::SSI):
<http://perl.apache.org>
Cheers,
Jan
--
Hanlon's Razor: Never attribute to malice that which can be adequately
explained by stupidity.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
e
>please help me out?
>
sudo make install
might help, because /System/Library/Perl/5.8.6/ExtUtils/ is writable by root
only.
Best,
Jan
--
Either this man is dead or my watch has stopped. - Groucho Marx
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PRO
kes the code outside the methods cleaner, I wonder if it would
make a significant difference in performance if the calls to the methods
contained all the conditions:
$self->children() if $self->{type} eq 'page';
Thanks in advance,
Jan
--
These are my principles and if you don&
Hi,
Jan Eden wrote on 27.07.2005:
>In other words, I would like to have something like the %actions
>hash to construct a more flexible version of the $item->$mode()
>construct, where I can pass different additional parameters to each
>method.
I finally came up with someth
ocations, without a way
to actually get to those method invocations?
In other words, I would like to have something like the %actions hash to
construct a more flexible version of the $item->$mode() construct, where I can
pass different additional parameters to each method.
Thanks,
Jan
I have
fix this problem.
>
>Thanks in advance, Dave Adams
>
You probably did something like
$var->print
This only works if $var is a blessed reference, i.e. an object of a class
containing the subroutine (method) print.
Cheers,
Jan
--
There are two major products that come out of Berkeley:
Randal L. Schwartz wrote on 26.07.2005:
>The following message is a courtesy copy of an article
>that has been posted to perl.beginners as well.
>
>>>>>> "Jan" == Jan Eden <[EMAIL PROTECTED]> writes:
>
>Jan> chdir "/some/dir";
Xavier Noria wrote on 26.07.2005:
>On Jul 26, 2005, at 11:31, Jan Eden wrote:
>> But I wonder why my initial example works for you. File::Path doc
>> says:
>>
>> 'The "mkpath" function provides a convenient way to create
>> directories, ev
Hi John,
John W. Krahn wrote on 26.07.2005:
>Jan Eden wrote:
>> Hi,
>
>Hello,
>
>> this does not work:
>>
>> mkdir "/some/dir/newsubdir" or die "$!";
>
>That works for me. What error message do you get?
>
I get "File exist
Jan Eden wrote on 26.07.2005:
>Hi,
>
>this does not work:
>
>mkdir "/some/dir/newsubdir" or die "$!";
>
>while this does:
>
>chdir "/some/dir"; mkdir "newsubdir/" or die "$!";
>
>In the shell, I can obviously execu
Hi,
this does not work:
mkdir "/some/dir/newsubdir" or die "$!";
while this does:
chdir "/some/dir";
mkdir "newsubdir/" or die "$!";
In the shell, I can obviously execute the former.
Is it true that in Perl, I can create a directory only wi
Hi,
zentara wrote on 24.07.2005:
>On Sun, 24 Jul 2005 11:22:18 +0200, [EMAIL PROTECTED] (Jan Eden)
>wrote:
>
>>Hi,
>>
>>I thought about using Image::Magick to create thumbnails for image
>>galleries (either 10 or 5 thumbnails per page) on the fly and tested
>
height, width => $width);
binmode STDOUT;
print $q->header( "image/jpeg" );
$image->Write("jpeg:-");
Unfortunately, this is unacceptably slow. I know that ImageMagick is quite
ressource-intensive - but is there a way to significantly speed up the
automatic generat
Thanks, Xavier and Bob,
that looks much better.
Cheers,
Jan
Bob Showalter wrote on 21.07.2005:
>Jan Eden wrote:
>> Hi,
>>
>> I need to store a list of month names into a hash structure such that:
>>
>> $self->{monate}->{1}->{bezeichnung} =
ichnung} =
$month_hash{$_}; }
The following did not work:
@{$self->{monate}->{1 ..12}->{bezeichnung}} = ("Januar", "Februar", "März",
"April", "Mai", "Juni", "Juli", "August", "September", "Oktober
Hi,
Offer Kaye wrote on 14.04.2005:
>On 4/14/05, Jan Eden wrote:
>>
>>In example 1, I have to set the variable explicitly 5 times, in
>>example 2, I have to manually list all cases outside the switch
>>statement, which bears the risk of forgetting to modify the line
meters{type} = 'gallery';
}
In example 1, I have to set the variable explicitly 5 times, in example 2, I
have to manually list all cases outside the switch statement, which bears the
risk of forgetting to modify the line once I extend the switch statement.
So is there a better way to do it?
Robin wrote on 12.04.2005:
>On Tuesday 12 April 2005 00:31, Jan Eden wrote:
>> system ("webalizer", "-c ./webalizer.conf",
>> "/Users/jan/Sites/apache_logs/$file"); }
>> }
>> closedir(DIR);
>>
>> webalizer complai
Hi,
I have to do some log processing with webalizer and tried to do the following:
#!/usr/bin/perl
use strict;
use warnings;
opendir(DIR, "/Users/jan/Sites/apache_logs") or die "Cannot open directory";
while (defined(my $file = readdir(DIR))) {
if ($file =~ /^w
). But now I
remember that the whole lookahead/lookbehind has to be of a fixed length, so
you cannot use quantifiers.
Thanks again,
Jan
--
A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools.
--
To unsubsc
separate match for it
* loosing the convenience of the g switch to wade through the whole file?
Thanks,
Jan
--
I'd never join any club that would have the likes of me as a member. - Groucho
Marx
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
Jan Eden wrote on 18.03.2005:
>Hi,
>
>I have a bunch of files in the iso-8859-1 text encoding which I want
>to save (in an edited form) as UTF-8.
>
>I use the following line:
>
>use open IN => ':encoding(iso-8859-1)', OUT => ':utf8';
>
>
time, and it always worked.
When I open the original files, they are Latin-1 encoded. When I comment the
line above, the output files are also Latin-1 encoded.
What is happening here?
Thanks,
Jan
--
Remember: use logout to logout.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additiona
Hi Ovid,
Ovid wrote on 11.02.2005:
>Hi Jan,
>
>Apologies in advance if any of this seems too pedantic.
>
I was asking for pedantic remarks. ;-)
>What you are essentially looking for is SQL capable of handling tree
>structures so you can pull this data in a single fetch. Y
Owen wrote on 25.01.2005:
>On Mon, 24 Jan 2005 14:31:53 +0100 Jan Eden <[EMAIL PROTECTED]>
>wrote:
>
>>Hi,
>>
>>I create monthly log files with names like statistics_01_2005.log.
>>Now I have a function which returns the logfile name for the current
>>
This looks quite clumsy to me. Is there a more elegant way?
Thanks,
Jan
--
How many Microsoft engineers does it take to screw in a lightbulb? None. They
just redefine "dark" as the new standard.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EM
Hi John,
John W. Krahn wrote on 13.01.2005:
>Jan Eden wrote:
>>It also does not show up if I enclose the ternary operator in
>>brackets:
>>
>>my $server = shift || ($string =~ /(foo|bar)/ ? $1 : 'default');
>>
>>While this solves my problem, I st
n for it. Could
someone shed a light on this precedence confusion?
Thanks,
Jan
--
There are two major products that come out of Berkeley: LSD and UNIX. We don't
believe this to be a coincidence. - Jeremy S. Anderson
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-m
Jan Eden wrote on 10.12.2004:
>I am also a little confused about which line endings come with text uploaded
>via
>a textarea. I use:
>
>my $input = $q->param('input');
>$input =~ s/[\r\n]{2,}/\n/g;
>my @urls = split /\n/, $input;
>
>to make
$input =~ s/[\n]{2,}/\n/g;
my @urls = split /[\r\n]+/, $input;
Note that I use a simple \n now in line 2 and the character class in line 3.
But some mixtures of these two versions do not work.
Where can I read up on linebreaks as transferred by web browsers?
Thanks,
Jan
--
There's no pla
Jan Eden wrote on 10.12.2004:
>Hi,
>
>I use the following to read in lines from an uploaded file:
>
>my $fh = $q->upload('input_file');
>while (<$fh>) { push @urls, $_; }
>
>It works fine when the file has UNIX or DOS linebreaks, but it fails
&
list.
Is there any reason not to use it?
Thanks,
Jan
--
These are my principles and if you don't like them... well, I have others. -
Groucho Marx
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Hi,
sorry! Overlooked the g switch, so the first parentheses captures either
nothing or the initial \\begin{letter}.
I got it now.
Thanks again,
Jan
--
These are my principles and if you don't like them... well, I have others. -
Groucho Marx
--
To unsubscribe, e-mail: [EMAIL PROTECTED
Hello John,
John W. Krahn wrote on 03.12.2004:
>Jan Eden wrote:
>> Hi,
>
>Hello,
>
>> I have lines like the following:
>>
>> \begin{letter}{Name\\ Street\\ ZIP\\ Country}
>> \begin{letter}{Name\\ Street\\ ZIP}
>>
>> To extract the info
solved the problem in a different, this is not strictly necessary,
I was just wondering if there's a regex way to do it and if it is even possible
in a single regex.
Thanks,
Jan
--
Remember: use logout to logout.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e
Thanks, Errin, Doug and Bob,
Errin Larsen wrote on 01.10.2004:
>On Fri, 1 Oct 2004 17:41:50 +0200, Jan Eden <[EMAIL PROTECTED]>
>wrote:
>>How can I pass an option to system's first argument in a setting
>>like this?
>
>This is ironic:
>
>>If all else
now I can use a module instead of calling wget, but this is a more general issue.)
Thanks,
Jan
--
If all else fails read the instructions. - Donald Knuth
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
> > my %HoA3 = (key1 => ['C',2]);
>>> >
>>> > into:
>>> >
>
>Only this one works
>
>>> push @{$HoA{key1}}, ( @{$HoA2{key1}}, @{$HoA2{key1}});
>
It is valid Perl code, but it should not have the desired effect. Note the double
refe
x27;,1],['B',2],['C',2]};
So you want a hash of an array of arrays, right? This is adding another level of
encapsulation.
So you could do this
#get the actual length of your target array and add one
$array_element = $#HoA{key1}++;
#push the new list of values into a new array inside the HoA
push $HoA{key1}->[$array_element], @{$HoA2{key1}}
Or did I get you wrong?
- Jan
--
There's no place like ~/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
Chap Harrison wrote on 30.09.2004:
>
>On Sep 30, 2004, at 9:55 AM, Wiggins d Anconia wrote:
>
>> Out of curiousity based on your description shouldn't it return,
>>
>> :::::::
>>
>> Or do you really mean, you are trying to capture all 4 digit strings
>> that are not
";
>
Kannst Du uns das komplette Skript (inklusive des Teils, in dem die Variablen bestückt
werden) schicken? Anhand des Schnipsels ist der Fehler schwer zu lokalisieren.
- Jan
--
Remember: use logout to logout.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
.
- Jan
Charles K. Clarkson wrote on 29.08.2004:
>I'm not certain fast and good are always the same thing in
>programming. Certainly, a fast solution is preferred to a slow
>solution. But if the fast solution doesn't scale or if it is
>hard to understand it may not be
$input_file[$_] = join "\n", @merge_three;
print $input_file[$_], "\n\n";
$input_file[$next] = '';
(@merge_one, @merge_two, @merge_three) = ();
}
}
my $output = join "\n", @input_file;
open (OUTFILE, ">input_file2.txt")
't your script provide a link list like
this:
Item 1234
Item 1235
Item 1236
Item 1237
This is what Wiggins meant when writing "modify your original results page" (as far as
I understand him). It has nothing to do with the database nor with Perl. But it works,
openin
ektion of my skript changes?
>
I don't think it's a good idea to have a script write to itself. The
DATA section is meant to keep static input out of the way of your
processing commands. If you want to modify it, I suggest storing it
outside of the script.
- Jan
--
If all els
'll get a more informative error message then.
- Jan
--
A common mistake that people make when trying to design something completely foolproof
is to underestimate the ingenuity of complete fools.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROT
ing $. also localizes Perl's
notion of "the last read filehandle". (Mnemonic: many programs use "." to mean the
current line number.)
HTH,
Jan
--
There's no place like ~/
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>
_coc
> from gafs_difms gd, gafs_load gl
> where gd.ie_proc_cd='1'
> and gl.ie_infile = gd.ie_infile
> and gl.ie_seq_nbr = gd.ie_seq_nbr";
>my $sth = $dbh->prepare($Command);
>my $rc = $sth->execute;
You do not need to assign the result of $sth-&
y put "==" to replace "=", the result return like
>sample 2.
To check equality of numbers, use "==", to check the equality of strings, use "eq". A
single "=" assigns a value to a variable.
HTH,
Jan
--
Either this man is dead or my w
ch);
sub wanted {
if $File::Find::name =~ /webdata.tab/ {
# open the file and look for the header
# return a message including the $FIle::Find::name if the header is found
}
}
HTH,
Jan
--
If all else fails read the instructions. - Donald Knuth
--
To unsubscribe, e-mail
t;but this script will list all the filename, from the disk. So, how I
>set the condition, only display the same filename in the same
>directory? Anybody can give me the solution? And your solution will
>appreciate.
print $File::Find::name, "\n" if $File::Find::name =~ /Fil
$myhash{mykey}. You assign the second value within that array to $var. In this case, a
more readable version could utilize arrow dereferencing:
$var = $myhash{mykey}->[$index];
But what you are trying to do (according to youzr subject line) is
$myhash{mykey}->[$index] = $var;
Or d
MCMULLIN, NANCY wrote on 14.05.2004:
>But when I run the same code with use strict commented out - it
>works just fine...
A little late maybe, but CGI::Carp might be something for you. Its method
fatalsToBrowser sends Perl's error messages to your browser window.
HTH,
Jan
--
T
Daniel,
Daniel Staal wrote on 29.04.2004:
>--As of Thursday, April 29, 2004 10:43 AM +0200, Jan Eden is alleged
>to have said:
>
>>I have a piece of HTML code containing two Perl variable names,
>>which is to be used in 6 scripts. So I tried to put it into a
>>separa
Hi Charles,
Charles K. Clarkson wrote on 29.04.2004:
>Jan Eden <[EMAIL PROTECTED]> wrote:
>It may be an issue with your terminal software. Is
>your terminal the place you expect to display results
>of a script like this? Have you tried it under a
>different terminal
Hi Rob,
Rob Dixon wrote on 29.04.2004:
>Jan Eden wrote:
>>The obvious problem is, that the variables are not interpolated
>>according to their current value in the scripts, i.e. although
>>
>>$mother_id = 453; and $title = "Title";
>>
>>The $p
ding ISO-8859-1 character, and if possible (under perl 5.8
>or later) will replace to Unicode characters. Unrecognized enti-
>ties are left alone.
I do have Perl 5.8.1, so I'd expect the decode_entities method to return a Unicode
character string. Why doesn't it do that?
Thanks,
le = "Title";
The $page_head variable will an contain empty title tag and show_local.pl parameter
after the do command.
How can I circumvent this without writing the html code in all the six scripts? eval
does not seem to be an alternative here.
Thanks,
Jan
--
Common sense is what tell
Hi!
> > how can I fix this error telling perl to search in corretc path (that
> > is /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/Fcntl.pm)?
You can push || unshift(@INC, 'some directory').
Best regards,
Jan
--
cat /dev/world | perl -e "while (<>) {(/(^.*?\?)
374 22 Mar 12:15 ImageMagick-5.5.1
-rw-r--r-- 1 root admin 2209216 7 Feb 16:00 libMagick++.a
-rwxr-xr-x 1 root admin 977 7 Feb 16:00 libMagick++.la
-rw-r--r-- 1 root admin 7406544 7 Feb 16:00 libMagick.a
-rwxr-xr-x 1 root admin 828 7 Feb 15:59 libMagick.la
-rwxr-xr-x
tribution (gwTeX), and I found:
drwxr-xr-x 14 root admin 476 22 Mar 12:15 Magick++
-rw-r--r-- 1 root admin 389 7 Feb 16:00 Magick++.h
drwxr-xr-x 3 root admin 102 10 Nov 00:26 freetype2
-rw-r--r-- 1 root admin 3814 4 Jan 21:31 ft2build.h
drwxr-xr-x 18 root admin 612 22 Mar 12:
t orientd perl.
Randal Schwartz: Learning Perl Objects, References and Modules (O'Reilly).
It's partly identical with perlboot, but more gently paced.
- Jan
--
The day Microsoft makes something that doesn't suck is the day they start selling
vacuum cleaners.
--
To unsubscribe, e-
Charles K. Clarkson wrote on 23.04.2004:
>Jan Eden <[EMAIL PROTECTED]> wrote:
>:
>: Jeff 'japhy' Pinyan wrote on 23.04.2004:
>:
>: ># read 6 lines from IN and put them in @record
>: >my @record = map scalar(), 1 .. 6;
>:
>: How does this
n scalar context. But how are the numbers from
the range operator applied to the expression scalar()?
Thanks,
Jan
--
These are my principles and if you don't like them... well, I have others. - Groucho
Marx
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [E
robust. What are the
>>technical arguments for one over the other? JP
>
This implies that programming/scripting languages differ not more than softdrinks.
Interesting. So by knowing (a little) Perl, I can program also Fortran and Cobol! I
never knew that. Thanks Ron! ;)
Jan
--
The day Mic
this method. But in the script based on Chris' suggestion (s. my reply
on the list) I just have to change two vars ($begin_season and $end_season) to
prolong/shorten the season.
Then again, I'd rather offer discounts (e.g. for booking more than 14 days) and
discount coupons during w
Hi Chris,
- Original Message -
From: Chris Charley
Sent: 21.04.2004, 18:48 Uhr
>Hello Jan
>Maybe something like this would do what you want :-)
>
>#!/usr/bin/perl
>use strict;
>use warnings;
>use Date::Calc qw/Delta_Days Date_to_Days Add_Delta_Days/;
>
>my
- Original Message -
From: WC -Sx- Jones
Sent: 21.04.2004, 14:23 Uhr
>Jan Eden wrote:
>
>> if (season($start_date) && season($end_date) {
>> $season_days = Delta_Days($start_date, $end_date)
>> } elsif season($start_date) {
>
>
>try not to ma
- Original Message -
From: WC -Sx- Jones
Sent: 21.04.2004, 13:32 Uhr
>Jan Eden wrote:
>> if $mmdd > 0915 and $mmdd < 0630) ...
>>
>> in my calculation to allow for any combination of $80 and $55 days.
>
>(($mmdd > 0915) && ($mmdd < 0630
Hi,
I need to find the number of days between two dates. The Perl Cookbook provides this
solution:
use Date::Calc qw(Delta_Days);
@bree = (1981, 6, 16); # 16 Jun 1981
@nat = (1973, 1, 18); # 18 Jan 1973
$difference = Delta_Days(@nat, @bree);
But there's a hook: I need to calcul
Hi Ben,
- Original Message -
From: Ben Miller
Sent: 21.04.2004, 9:16 Uhr
>Hi Jan,
>
>Thanks for your help. That's what I need. I had tried something
>similar earlier using () to surround the variable rather than []. My
>next question is: when I try to print a specific
>
>The while loop pulls all text which sits between 'a' tags on the
>page being scraped. I'd like to force $result to accept each word as
>part of an array. Any clues?
You could assign an array reference to $result:
my $result = [($stream->get_trimmed_text("/a"
ir );
sub printer {
my $size=(stat($File::Find::name))[7];
print qq{$File::Find::name $size\n};
}
---
This gives me something like
Listing of /Users/jan/Sites/janeden/public/comp
/Users/jan/Sites/janeden/public/comp 272
/Users/jan/Sites/janeden/public/comp/.DS_Store 6148
/Users/jan/Sites/
Hi Jane,
- Original Message -
From: Ryan Thomas
Sent: 21.04.2004, 12:18 Uhr
>Hello All
>
>I have a script below that lists a directory tree structure (thanks for the base
>code Jan!)and have modified it, unsuccessfully, to add the file size.
>
>What have i done wrong
\n}; },
$dir );
print "";
---
This script is intended to be called like './lister.pl > index.html'. Leave out the
HTML tags to create a simple text listing.
HTH,
Jan
--
There are 10 kinds of people: those who understand binary, and those who don't
--
To unsubscri
t would break
(hadn't I inserted the parent meta tag to communicate the fact the site is nested.
Thanks again,
Jan
--
There are two major products that come out of Berkeley: LSD and UNIX. We don't believe
this to be a coincidence. - Jeremy S. Anderson
--
To unsubscribe, e-mail: [EM
- Original Message -
From: WC -Sx- Jones
Sent: 19.04.2004, 9:00 Uhr
>Jan Eden wrote:
>>But now I had to change the layout and embed some sites. Their site
>>roots and template location are now
>>
>>'~/Sites/janeden/whatever' and
>>'~/Sites
en/whatever' and '~/Sites/janeden/whatever/templates/whatever.tpl'
I temporarily fixed the resulting problem by adding another meta tag (parent), which
contains the name of the embedding site. But there has to be a smarter solution.
Can someone give me a hint?
Thanks,
Jan
--
SERVER3,C$,NTFS,38123,29812,8315
>
Ok, so use a character class:
s/[ \t]+/,/g;
(mind the space in front of the tab inside the character class)
HTH,
Jan
--
Hanlon's Razor: Never attribute to malice that which can be adequately explained by
stupidity.
--
To unsubscribe, e-mail: [EMAIL PROTEC
and to a file) and I could not solve it.
>
>It has nothing to do with the $1, as I tried to write a fixed text
>and the file didn't gets created.
How about
print FH $1;
Probably too simplistic, but this is the standard way to write to an open filehandle.
- Jan
--
If all else
[EMAIL PROTECTED] wrote:
>$hash_ref = {key => "value", key2 => "value2"};
>print $hash_ref->{key};
>
>It will go and get the 'key' key from the hash that $hash_ref points
>to.
The print function will actually print "value" here,
gt;$a--;
>}
>print "Blast off!";
>
Apart from the missing semicolon, I don't know if Perl on Windows like the shebang
line at the beginning. With Unix, it's the right way to do it.
- Jan
--
There are two major products that come out of Berkeley: LSD and UNIX. We don
James Edward Gray II wrote:
>On Feb 17, 2004, at 3:13 PM, Jan Eden wrote:
>
>>
>> Rob Dixon wrote:
>>>
>>> my @data = map { tr/%//d; [split] } split /\n/, $str;
>>>
>>
>> A little late maybe, but...
>>
>> Why do you have
Rob Dixon wrote:
>
> my @data = map { tr/%//d; [split] } split /\n/, $str;
>
A little late maybe, but...
Why do you have the second (in the order of operation) split operator in brackets?
Shouldn't it just split $_ on whitespace if no arguments are given?
- Jan
--
If all else
sort pattern might be easier on the eye the array and hash are not
named @a and %b.
$ perl -le'
my @array = qw( Mary John Dan );
my %hash = qw( John 0 Dan 1 Mary 2 );
print "@array";
@array = sort { $hash{ $a } <=> $hash{ $b } } @array;
print "@array";
'
Mary Jo
This is the answer:
>
>%level = ( 2001-12-30 => 152, 2002-03-19 => 210);
>
>
You mean like this?
for (@dates) {
$level{$_} = $highest_level{$_};
}
HTH,
Jan
--
A common mistake that people make when trying to design something completely foolproof
is to underestimate the ingenuit
R. Joseph Newton wrote:
>Jan Eden wrote:
>
>>Hi,
>>
>>[EMAIL PROTECTED] wrote:
>>
>>>I have a text file with a records like:
>>>
>>>smith, James, Dr., 115 Fourth Street, Chicago, IL, 32012, $20.00:
>>>[EMAIL PROTECTED]
>>&g
ink I'd probably code it as:
>
>Thanks a lot! =)
>
>Kind regards,
>
>Benjamin
>
And you could read the extensive thread named "Array containment" I started recently.
I got several suggestions, including mapping to a hash and using grep.
- Jan
--
There are 10 k
sh
$template =~ s{ %% ( .*? ) %% }{ exists( $param{$1} ) ? $param{$1} : ''}gex;
return $template;
}
It is not a good idea to choose strings like $last_name as your placeholders, since
such strings are considered variable names in Perl.
This might not sound too helpful, but if you deliv
1 - 100 of 216 matches
Mail list logo