Well, at least it's not as bad as the out of office auto replies!
___
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
You can also use this bizarre construction to capture just the count:
$_ = ABabcde12345BAABabcde1234blahblah5BA;
$count = () = $_=~ /(AB.*?BA)/g;
print I matched $count times\n'
the () between the two ='s forces the match to list context, and then
THAT is forced to scalar
A completely untested thought that popped into my head when reading the
thread...
Get all PIDs for Excel instances.
Start your instance of Excel.
Get all PIDs for Excel instances.
This way you should be able to work out which one is yours?
Like I said, untested, and just a thought.
R.
Richard-qswi266
Cc: [EMAIL PROTECTED]
Subject: Re: Going back to earlier perl.
Beckett Richard-qswi266 wrote:
Guys,
I'm having too many problems with activeperl 5.8.4 build
810, so I've decided to go back to 5.8.1 build 807.
I don't doubt that you are confronted with problems
Hi Guys,
All I want to do is to have STDOUT and STDERR going to the screen AND to a log
file as well. You'd think this would be easy, wouldn't you?
Well, unless my widgets have come loose, it isn't. I was tearing my hair out
last night, and finally gave up at 2am! I suppose the lateness of the
No.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Ted Schuerzinger
Sent: 17 November 2004 04:41
To: Perl Mailing List
Subject: Is anybody else having problems with the mailing list?
I haven't received a message for four days. And I *know*
Hi Guys,
I've managed to log STDOUT to a file like this...
if (defined ($outfile)) {
$tee = IO::Tee - new($out, \*STDOUT);
select $tee;
}
However, if I want to stop logging to a file, but carry on getting print outs
to the screen, what do I need to do?
Thanks.
R.
Guys,
I'm having too many problems with activeperl 5.8.4 build 810, so I've decided
to go back to 5.8.1 build 807.
As long as I make a note of the modules that I've personalised, is there
anything else I need to save before blowing 5.8.4 away?
Thanks.
R.
use strict;
use warnings;
my $pat = abcdefghijklmnopqrstuvwxyz;
print \$pat is $pat\n;
$pat =~ /(.*).*(.*)/;
my ($one, $two) = ($1, $2);
print \$one is $one\n\$two is $two\n;
R.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Jutu Subramanian,
All you need to get the file size is -s.
I.e. $file_size = -s $file
Save the following script as size.pl, and run like this:
perl size.pl size.pl
use strict;
use warnings;
my $file = $ARGV[0];
my $file_size = -s $file;
print $file is $file_size bytes\n;
-Original Message-
From:
Guys,
I've just started playing with the debugger that came with the perl dev kit, and I'm
wondering if it's possible to view the contents of an array?
I have @ARVG, but if I evaluate it, I get 4, which I should have expected, I suppose,
but I would also like to see what the array elements
So if I'm debugging something like this:
my @list = @ARGV;
unless I add these lines to my script:
for (@list) {
my $var = $_;
}
I'm not going to be able to look at the contents of either array in the debugger?
R.
___
Perl-Win32-Users mailing list
Like maybe use quick eval (^E) to eval @ARGV.
Aaahhh! OK, you can slap me now ;-)
I was using QuickEval on @ARGV, rather than on @ARGV
D'oh!
Thanks,
R.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe:
Guys,
Most of my scripts involve Tk GUIs, so once I started to use the debugger 'properly',
I've discovered that it's next to useless when Tk is involved.
Is there a debugger that would be useful for debugging a Tk script?
Thanks.
R.
___
Guys,
I'm checking a variable with a pattern match...
$id = * unless ($id =~ /\d{1,3}/);
Now, this works everytime, and gives me the result I want, even if $id is undefined.
However, if $id IS undefined, I also get this message:
Use of uninitialized value in pattern match (m//) at...
So, in
$id = * unless defined $id and $id =~ /\d{1,3}/;
I usually don't do it that way, it's easier to catch it when you init
$id in the first place.
Good point $Bill.
So, what I should do is:
my $id = $botid || *;
rather than:
my $id = $botid;
which could be undefined (depending on how stupid
David Liouville wrote:
And how to get physical informations about disks ?
Physical information?
What, like width, height, weight, colour?
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe:
Lee,
Try typing widget at the command prompt. This will show you around Tk.
R.
All,
Now, I know I can build a front end in Visual Basic, but I
would like to take the opportunity to do something new. Can I
build a GUI using perl? If so, can someone point me to some examples.
Guys,
Try the script below. What it should do is this...
Start it up, and it will wait for you to press a button.
Press 'Exit' and it exits.
Press 'Start' and it starts counting up to 100.
Once stared, there is a cancel button.
If you press 'Cancel' it should stop the counting, and return to the
work, as there is no loop in the start sub,
and I don't want to have to put loads of 'return if $cancel;' lines all through it (if
I can help it!).
R.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Beckett Richard-qswi266
Sent: 19 October 2004
Guys,
Can anyone help me to do what this excel macro does, but from perl, please?
I have tried this, but it doesn't seem to do anything:
my $range = A1:C49;
my $sheet = $workbook - Worksheets(Graph);
$sheet - Activate();
my $chart = $sheet - ChartObjects(Chart 1);
$chart - Activate();
# $chart
Guys,
This script:
use strict;
use warnings;
my @array;
for (0..3) {
push @array, [$_:, 1, 2, 3];
}
for (0..$#array) {
my $row = $_;
for (0..3) {
my $col = $_;
print $array[$row][$col], unless ($col == 3);
print
Thanks to all those who helped, so far! :-)
foreach ( @array ) {
print join ( , , @{$_} ), \n;
}
This is the nice easy print statement I was looking for, but I don't quite understand
it. I get the print, and the join, but what is @{$_} all about?
Going back to the array:
1/1/2004 0 34.5
sub _Typelib {
my ($clsid,$title,$version,$langid,$filename) = @_;
# Filenames might have a resource index appended to it.
$filename = $1 if $filename =~ /^(.*\.(?:dll|exe))(\\\d+)$/i;
# Ignore if it looks like a file but doesn't exist.
# We don't verify existance of
Guys,
I have another conundrum...
I have a directory with a series of files, named like this:
251_20040525_051500.log
Where the 251 is a device number, and the 20040525_051500 is a date and time string,
which means:
25th May 2004 05:15.00
I can easily extract the date, and hour (which is
Guys,
I know I shouln't ask like this, but I don't want to re-invent the wheel, and I bet
that most seasoned hackers out there already have a snippet that'll do this...
What I want is to supply a directory, and have a script go through every file and
sub-dir recursively, turning the read-only
That's the ticket!
Thanks.
R.
From: Rhesa Rozendaal
attrib -R \your\directory /S /D
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Guys,
This seems really simple, but I can't get it to work!
This works as intended...
my $arg1 = c:/my_scripts/file.txt;
my $arg2 = c:/my_scripts/another.txt;
my $program = c:/my_scripts/cheese.pl;
my @args = ($arg1, $arg2);
exec $program @args;
HOWEVER, I cannot for the life of me get the
As you want the quotes passed to the shell try...
$arg1 = \c:/my_scripts/file.txt\;
or
$arg1= 'c:/my_scripts/file.txt'; (single quoted
string with 's
inside)
I've tried every combination I can think of of \, and ', but I couldn't get it to
work. Have a go, you'll soon
if ($var =~ /no/i)
I think that the original sender of the message (and most
everyone else)
knows the solution. His point is that this kind of change
should never
happen. I'm glad I don't use Tk.
Thanks for that vote of confidence! :-)
It turns out that it's not a W2K - XP issue, but
Ooh, I wrote something similar. Is this any use to you?
use Time::HiRes qw( usleep gettimeofday tv_interval );
...
$start = [gettimeofday()];
if ($ping - ping ($host, $timeout)) {$success = 1}
$end = [gettimeofday()];
$interval = (tv_interval ($start, $end) * 1000); # $interval in ms.
R.
Hi Jan, can you help with this confusion, please?
c:\ppm query Time-HiRes
Querying target 1 (ActivePerl 5.8.1.807)
1. Time-HiRes [1.59] High resolution alarm, sleep, gettimeofday, interval timers
c:\perl -MTime::HiRes -eprint $Time::HiRes::VERSION
1.52
c:\perl -MTime::HiRes -eprint
The problem is that for Perl 5.8 Time::HiRes is a core
module, installed
in Perl\lib. Installing another version via PPM into Perl\site\lib
doesn't do anything for you unless you change the order of directories
in @INC. Or you have to move the module into the lib tree manually
(don't forget
Then you will have to hack the Wm.pm module. You need to add
three lines.
i.e. The middle three as shown below.
I will supply Nick with a proper patch for the next version.
my ($mw,$mh) = ($w-reqwidth,$w-reqheight);
my ($minwidth,$minheight) = $w-minsize; #JD#
$mw = $minwidth
Hi Guys,
Does anyone know if there is a way to get popup to work properly, after you've issued
a minsize command?
In the example below, if you comment out the line $popup2 - minsize (qw(162 190));
in the popup2 sub, then the second popup appears in the centre of the main window.
With that
I would think just a normal search feature would be good enough.
Find the first one and then hit next for the next one etc.
That, IMO is the best feature of Crimson Editor... you can highlight something with
the mouse, hit F3 and it takes you to the next instance of it, hit shiftF3 and it
It's not clear what you really want, but what about this...?
sub print_rec() {
open (SAVE, c:/save/data.txt);
@key = keys %info;
foreach $_ (@key) {
print $_:$info{$_}\n;
print SAVE $_:$info{$_}\n;
}
close SAVE;
}
R.
-Original Message-
From:
Guys,
I have a script that reads a file line by line, looking for a start tag.
When it finds one, it jumps to a processing routing that continues through the file,
line by line until it reaches an end tag.
Then it carries on looking for a start tag.
I have just found a scenario where a start
So I get:
/^-?(?:\d+\.?\d*|\.\d+)$/
I'm being thrown by the ?:
What's that all about?
R.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Nothing. Since Text::ParseWords is one of the core Perl modules, it is
not listed by PPM. Only core modules that have been upgraded
will appear in a query listing.
Ah!
I've never quite understood the rationale behind that.
To confuse the slightly less new newbie? Must keep 'em on
Guys,
I must have brain fade, 'cause I can't work out how to do this...
I get a geometry string with my $geom = $mw - geometry; which gives $geom =
104x28+619+498.
I want $geom to be just the +619+498 part of above.
It seems silly to do it like this, beacuse the if will always be true.
my
Thanks Guys, I've got some quite interesting methods from that!
The one that I knew, but just couldn't focus on for some reason was:
$geom =~ s/.*(\+-?\d+\+-?\d+)$/$1/;
(Forgot that you could get 367x313+-70+-18).
I'll slap myself again! ;-)
R.
Guys,
I must have brain fade, 'cause I
Can someone tell me what would be wrong with:
$geom =~ s/^\d+x\d+//;
Nothing! :-) It's a lot neater, too. Told you I was having a brain fade day! ;-)
R.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe:
Hello world!
Does anyone know how to position the Win32::FileOp SaveAsDialog window? At the moment
it always seems to come up in the top left corner of the screen.
Is it something to do with the -handle option, and am I doing that right if the main
window is called $mw?
I am invoking it like
Guys,
I've done a GUI that parses text files into csv files.
When it's finished I place a widget called $done on the gui.
If you press the Go button again, it destroys $done, then starts processing, and
places $done on the gui again when it's finished.
The problem is, I want $done to
Guys,
When I use getSavefile, if the user selects an existing file name, then a dialog box
pops up saying it exists, and do they want to overwrite it.
However, the way that my script works is that if you choose to write to an existing
file, it appends to that file, rather than overwriting it.
According to the docs on CPAN, there's a -multiple option, but I can't get it to work.
Let us know if you have any joy.
R.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Dirk Bremer \(NISC\)
Sent: 12 March 2004 14:55
To: [EMAIL PROTECTED]
Subject:
Guys,
This line successfully gives me the last used row in a populated
spreadsheet:
my $LastRow = $sheet-UsedRange-Find({What=*,
SearchDirection=xlPrevious, SearchOrder=xlByRows})-{Row};
However, if the spreadsheet in empty, I get the following error:
Can't use an undefined value as a HASH
Guys,
I find myself in a slightly tricky, and possibly unusual situation.
I have been handed a GUI, written in Delhpi. I have a button that collects
some parameters, then fires off my perl script.
Now, I want to use Tk and open up a window with a Text widget in it that
reports the progress of
Interesting how people tend to start and end searches these days with
Google. Next time you may want to check the FAQ. The answer
to this question is in PerlFaq8.
Following on from this RTFF, I have a problem with perldoc on my W98 machine
at home.
The lines of text |
always come o|
Guys,
I thought this woule be a lot easier than it seems...
All I want to do is to copy a directory, and everything it contains
(whatever this may be) to a new directory.
I (finally) managed it with a system command:
if (system xcopy /E/I/C \$default_path\ \$new_path\) {print Copy
Guys,
I've just been handed a GUI based program that's been written in Delphi 7
(whatever that is).
I think that Delphi is a GUI builder that's based on Pascal. Does anyone
know if there's a Perl vesrion, or can I convert what's already been done
into perl somehow?
Or is it time to learn
explain it better, please do, as I'd like to understand it fully.
R.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Beckett Richard-qswi266
Sent: 16 December 2003 17:32
To: [EMAIL PROTECTED]
Subject: Problem with Win32::Console and END block.
Does
Of
Beckett Richard-qswi266
Sent: 18 December 2003 12:05
To: [EMAIL PROTECTED]
Subject: SOLUTION - Problem with Win32::Console and END block.
I just thought I'd share the suggested solution...
With the problem below, someone suggested that I add a BEGIN
block like
this...
BEGIN {
$| =1
Guys,
Does anyone know how to catch the user pressing the X in the corner of the
window, like I can catch the Control-C?
$SIG{INT} = \control_c;
Thanks.
R.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe:
Does anyone know a way around this one. I want to set my dos window up with
80 cols and 100 lines, but when I do I break my END block.
use strict;
use warnings;
$| =1;
# use Win32::Console;
# my $BUFFER = new Win32::Console(STD_OUTPUT_HANDLE);
# $BUFFER-Size(80,100);
for (1..5) {print .; sleep 1}
Hi,
I would like to know how can I replace the value c:\qqq\www\ to
c:/qqq/www/.
I tried several ways, but didn't manage to.
Thanks,
Eran
s!\\!/!g
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe:
Guys,
Someone must have already done this, but I know I can't!
I have an input file name, and using:
use File::Basename;
fileparse_set_fstype(MSWin32);
my $file = fileparse ($ARGV[0]);
my $path = dirname ($ARGV[0]);
I am splitting the input file name into $file and $path.
I can handle the
Guys,
I've just completed a fantastic script that parses log files. ;-)
I sent it it to a user to test, and he thought that his PC had hung, whereas
in fact he'd just given it a huge file to parse. So, he ended it, despite
the fact that I printed Parsing log232.txt, please wait. This may take
Guys,
I've installed perl at home on my W98 system.
There are many reasons why I want to stick with w98, so changing OS is not
an option.
The problem is, that I use the command prompt a lot when writing/debugging
scripts, but the w98 prompt is really crap. It won't let you specify the
size of
Ok guys here is the pickle I'm in now =-) I need to read from
a ASCII file and only modify the lines that match a variable.
I do not want to read the entire file into memory and write
the entire file out each time I need to make a change.
Here is what I am doing that reads the entire file
Hi Guys,
I've got some LabEntries, but I can't figure how to insert a value into
them!
I don't understand how -textvariable is supposed to be used, so I was trying
to use:
$labentry - insert (end, $seasons{key}{$points});
What am I doing wrong?
Thanks.
R.
Guys,
I have a Tk GUI, which contains a notebook.
On a particular page, I use grid to place some rows of labels.
The user can initiate a command that results in there being less rows of
labels on this page, however when they do, the old labels are still there.
How do I get rid of them?
I've
Guys,
I'm scanning a text file, which has lines like this:
FirstPlace = 10
SecondPlace = 6
ThirdPlace = 4
FourthPlace = 3
FifthPlace = 2
SixthPlace = 1
SeventhPlace = 0
EightPlace = 0
they are lines 35..42.
If the points go 10,6,4,3,2,1, I want to set a var to 0, and if they go
Why not use chop? That removes the last character.
Yes, it certainly does even if the last character is not a
\r character.
So to do the work of one good regex substitute operator as
Lee suggested
you would have to determine some how (a regexp match operator?, a
substring to get the
Guys,
I am using a scrolled rotext widget with 2 lines as a status bar, so that
the user can scroll backwards over the messages.
How do I make the widget display the bottem of the scrolled area, rather
than the top?
Thanks.
R.
___
Perl-Win32-Users
AAaaahhh!
Thanks Jack.
R.
-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]
Sent: 26 September 2003 21:38
To: [EMAIL PROTECTED]
Subject: Re: Scrolled notebook page (Tk)
- Original Message -
From: Beckett Richard-qswi266 [EMAIL PROTECTED]
To: [EMAIL PROTECTED
Guys,
I know this is slightly off topic...
There's a program around that allows you to use the IR port on a pc as a com
port, under windows 2000. (Apparently under W2K it's a network port).
Does anyone know where it is, I really can't find it?
Thanks,
R.
What's the best text editor for perl?
R. (Trying to keep a straight face).
Just ask what's the best text editor for perl and
you'll see :)
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe:
Guys,
One of my hobbies is kart racing, and I've just bought a data logger that
records my lap times, gives 3 split times per lap, and records the peak
revs for each lap.
Currently at the end of a session, I have to write down all the data from
the device, then put it into a nice spreadsheet
Friends,
I got a text file that contains a list of computer names. I
need to write a
program that will read this file and execute following
command for each
computer name:
exec \\computer_name -u abc -p xxx abc.bat
where computer_name is picked up from the text file.
Can
Guys,
I'm writing a Tk GUI based script, and I am using getOpenFile to load in the
file I need to work on.
I was just working on a section where I write to a text file the path and
name of the last opened file, so that the next time you use the script, it
defaults to trying to open the last file
Guys,
I have a large text file, which contains data in the form:
parameter name=value // comment about the line
For example:
LCD Display Modes=3 // Add the modes to allow them: 1=status 2=aids
4=engine/brake temps
I am trying to make a GUI that will allow you to see the parameter, default
and
Run a debugger. Break right after perl_parse. Dump the OP tree
and feed it to B::Deparse. I have verified this method's validity
with the author of PerlApp. :-)
Erm... ?:-)
---
There's also an executable that's supposed to convert a
Guys,
Just knocking up a Tk GUI to read, display and change values in a text file.
I've just realised that I don't know how to write the new values back into
the text file in the correct location.
Anyone point me to where to start?
Thanks.
R.
___
This is a tricky one, and one I suffered with when my script fell over. I
had to go to the Task Manager find and kill the Excel process each time,
otherwise I couldn't run Excel up again.
I got around it by having an END block like this:
END {
if (defined $book) {$book - Close(0)};
:[EMAIL PROTECTED]
Sent: 21 July 2003 13:01
To: Beckett Richard-qswi266; [EMAIL PROTECTED]
Subject: R: Reading EXCEL Sheet question
Many tank's for your answare, but normally thi snippet of
code work as a part of W2K service (without console) and when
the service is stopped the perl proces
I tried this, at the top...
BEGIN { $SIG{'INT'} = \handler; }
sub handler {
$book - Close (0) if (defined $book);
undef $sheet;
undef $book;
$excel - Quit if (defined $excel);
undef $excel;
exit 0;
}
Then some code that opens excel and takes a
use strict;
use warnings;
my $input_file = input.txt;
open (INFILE, $input_file) or die Can't open $input_file! $!\n;
my @input = INFILE;
foreach (@input) {
chomp;
next if (/^\D/);
print $_\n;
}
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL
Masters!?
Is there a neater way of doing this:?
my $sheet;
foreach (1, 2, 4) {
$sheet = $_;
print \$sheet = $sheet\n;
}
something along the lines of:
foreach (my $sheet = (1, 2, 4)) {
print \$sheet = $sheet\n;
}
But this doesn't work as intended.
Thanks.
R.
Does anyone else see this when they post?
Any idea what it is? Should I worry about it?
Thanks.
R.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 18 July 2003 14:33
To: Richard Beckett
Subject: [ERR] Neater?
Transmit Report:
To: [EMAIL
Masters!?
Is there a neater way of doing this:?
my $sheet;
foreach (1, 2, 4) {
$sheet = $_;
print \$sheet = $sheet\n;
}
something along the lines of:
foreach (my $sheet = (1, 2, 4)) {
print \$sheet = $sheet\n;
}
But this doesn't work as intended.
Thanks.
This works for me to return the last populated row --
$worksheet_rows = $worksheet-UsedRange-rows-count;
Hmmm...
Been playing with this. If the sheet has data on it, then it does return the
number of the last populated row.
If the sheet is empty, it returns 1, which means that I insert my
This works for me...
/^Test.*PASS\!$/
Use this little script to check out your pattern matches:
while () {
chomp;
if (/^Test.*PASS\!$/) {
print Matched: |$`$'|\n;
} else {
print No match.\n;
}
}
R.
-Original Message-
Guys,
I think I have worked out why the following line doesn't do what I expected
it to.
I want @all_lines to become @all_lines from 0 up to $line_count minus 1.
This line:
@all_lines = @all_lines[0..($line_count--)];
I think is making @all_lines become @all_lines from 0 to $line_count, AND
Put the -- in the front instead of the back.
D'oh! :-D
After _all_ this time, I'm still just a newbie! ;-)
Thanks.
R.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Hello World!
I'm using Tk for a GUI, and I have a menu item that opens an instructions
window.
If I already have the instructions window opened somewhere, I want to bring
it to the foreground, rather than opening another window.
To this end, I can only see this way of doing it.
First, near the
You can call me Bill or $ (dollar) and you can *refer* to me as $Bill,
but don't call me $Bill. :)
Hehehe.
So, just to check that my brain _is_ working...
sub subroutine{
my $return = check_spreadsheet ($which = large frog);
if ($return eq Cancel) {return};
...
}
sub
Please stop CCing me, I read the list.
Thanks.
R.
___
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
After reading another mail, I have just discovered the OLE browser.
Is there any kind of help or tutorial on this, as some things I've looked up
are rather cryptic, and don't actually help me much?
Or should I remove myself from the Gene pool, as I'm obviously far too
stupid to procreate? ;-)
Hi Folks.
I've just read this...
The widget created by calling MainWindow-new is actually a top level
Widget.
...
This window is special because it displays itself automatically when you
call MainLoop.
...
By creating a Toplevel widget, you are creating another window as part of
your
You can't pack windows. They display automatically. What
you might try
doing is putting this line right after the line I of your
code that I quoted
above:
$console-withdraw();
Aha!
This should cause the window to hide before being drawn. To cause a
withdrawn window to appear when
I don't have my Tk book here at work, so I can't give you
page numbers, but some things to look at are:
I wasn't expecting that, just some words to look up. If you don't know the
word, the index is next to useless, unless you go through the whole thing
looking up words that might be related.
Hello.
Why is is that something like this...
if (condition) {
do something;
do somethingelse;
}
doesn't need semicolons after the brackets, but this...
$ftp - login ($user, $pass) or do {
error_sub ($_ = Cannot login to host, username or password
Thanks, guys.
I'm not sure I can explain what I thought, but here's a go...
I thought that:
If you define a variable with 'my' in the main part of the script, it is
available to all parts of that script, including subroutines.
In a subroutine, if you define a variable that is only used in that
I'm trying to match a string which would start with http://,
then a character string where there is one one or more
instances of %, followed by one instance of .com, i.e.
http://www.%55.com
Here is my current pattern:
http://.*%+.*(\.com)
However, if there are two or more
Richard,
%hash_default = %hash;
This does not copy the arrays or hashes referenced in the
values of the
hash. Remember a hash is an associative list of scalars.
Oh bum! :-)
That explains why very occasionally, it would seem to work, but I could
never reproduce the circumstances that
That *looks* ok at first glance. What do you mean by doesn't work?
Is there an error? Are you running with warnings? Or does it not order
them the way you want? Does it give you a different order than the
unsorted version, but just the wrong order?
Ah! Now I'm into lack of confidence errors
I just had a thought. (It's probably already been thought, though)
Is there a repositry of scripts anywhere?
Would it be a worthwhile thing to have a bucketfull of sample scripts
demonstrating hown to do something tricky, so that newbies could be pointed
to them and have a play.
This is how I
So %vars is a hash of array references. Fine, but I might use a hash
of hash references:
%vars = (
host = {
value = cheese.street.town.com,
label = Hostname: ,
entry = undef,
order = 1,
},
interval = {
1 - 100 of 115 matches
Mail list logo