1) I need to print some documents to any printer.
2) if possible make a print preview in tk.
Is there any way to do it?
What modules to look?
Thanks
MArcos
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Bruce Phillip wrote:
>
> Thanks for the feedback, The only thing is that $O^ will only
> work if the scripts are going to be invoke on that system.
>
> My plans are to run the perl script from one location and go
> and discover the systems and their configuration. I'll be using
> Net::Telnet m
Hi everyone
I have been trying to capture the output of a shell command (say ls or
echo *) in a variable but all i have been able to capture is the return
status of system comman which is 0.
I also tried changing the default output handler from STDOUT to the
filehandle of a file I have crea
Pawan wrote:
> I have been trying to capture the output of a shell command (say
> ls or echo *) in a variable but all i have been able to capture
> is the return status of system comman which is 0.
>
> I also tried changing the defaulT output handler from STDOUT to
> the filehandle of a file I hav
>> -Original Message-
>> From: Anthony J Segelhorst [mailto:[EMAIL PROTECTED]
>> Sent: Monday, October 27, 2003 5:50 PM
>> To: [EMAIL PROTECTED]
>> Subject: Opening a new shell
>>
>>
>> I am strapped for time on the run time on a perl script I have been
>> working on.
>>
>> I was wondering
[EMAIL PROTECTED] wrote:
using the following code I get a distorted file , I used the sockets and
the result is the same here is the LWP code i used
use strict;
use LWP::Simple;
my $url ="http://xxx.xxx.com/Amazing_Grace.mp3"; ;
my $html = get($url) ;
print $html;
exit(0);
I think that the tranfe
Hi,
I'm trying to find my IP address from within Perl for eth0 and ppp0.
Currently I run a regex on the output of ifconfig to extract his data -
but, I'd like to do this from within Perl and it strikes me that this
should be possible.
HELP!
Kev
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
My co-worker wrote a perl script on a WIN 2000 Advance server that
monitors my E10K 8 Unix domains. It executes every 15 minutes and then the
output attempts are logged in the /var/adm/messages on my unix domains
each time. How do I redirect this output to another log of its own to keep
it from fil
I do not think I need to run them in parallel. I just need scripta.pl to
finish in under 60 seconds and scriptb.pl can take as long as it needs to.
Scriptb.pl is only called when scripta.pl needs to call it.
I got some info on this: % perldoc -f fork
I am confused about the syntax of the f
Bob,
I appreciate your feed back but you clearly don't understand.
The perl script I'll be running will be executed only from one
Location and that is from my laptop. I'll be connected to a network
In which the script will be using Net::Telnet module to communicate
To the other systems. No n
Anthony, Mark. Please bottom-post so that people can understand
the conversation. Thanks.
Anthony J Segelhorst wrote:
>
> Mark wrote:
> >
> > Anthony J Segelhorst wrote:
> >
> > > I am strapped for time on the run time on a perl script I
> > > have been working on.
> > >
> > > I was wondering if i
> My co-worker wrote a perl script on a WIN 2000 Advance server that
> monitors my E10K 8 Unix domains. It executes every 15 minutes and then the
> output attempts are logged in the /var/adm/messages on my unix domains
> each time. How do I redirect this output to another log of its own to keep
>
On Monday 27 Oct 2003 7:32 pm, [EMAIL PROTECTED] wrote:
> Hi,
>
> I'm trying to accomplish some task using perl. So let
> me describe what I have.
>
> I have several systems of the following:
>
> Unix:
> Sun - Solaris
> HP - HPUX
>
> Windows:
> Dell - W
<[EMAIL PROTECTED]> wrote:
>
> Rob Dixon wrote:
> >
> > Bob Showalter wrote:
> > >
> > > This sounds fine in principle. Many of the standard Perl
> > > modules do this kind of thing. You use the built-in $^O
> > > variable to detect the operating system. If you want to
> > > see
> > > an example, d
Howdy group,
In developing a module and I am torn.
I want to use the newer our $variable; but to make it work
with pre 5.6 Perl (or whatever version our appeared in) I
have to do the use vars qw($variable); method
So I was wanting some input about pros and cons of using
either since on the su
Anthony, Mark. Please bottom-post so that people can understand
the conversation. Thanks.
Anthony J Segelhorst wrote:
>
> Mark wrote:
> >
> > Anthony J Segelhorst wrote:
> >
> > > I am strapped for time on the run time on a perl script I
> > > have been working on.
> > >
> > > I was wondering if i
Dan Muey wrote:
>
> In developing a module and I am torn.
>
> I want to use the newer our $variable; but to make it work
> with pre 5.6 Perl (or whatever version our appeared in) I
> have to do the use vars qw($variable); method
>
> So I was wanting some input about pros and cons of using
> either
Bob,
Thanks for the help but again your failing to understand.
The perl script it self will use Net::Telnet with the script
I run on this laptop that will be connected to a network.
The perl module Net::Telnet will issue the telnet session
Within the perl script.
Gary Stainburn was c
Anthony J Segelhorst wrote:
>
> Basically I am writing the script to monitor services on Windows Servers
> using net start and it reads in a config file, that the end user builds. I
> want to attempt tp restart the service using a net start "Service Name",
> but the monitoring product I am importin
Check out the Win32::Process module. It should be able to do what you want.
-Original Message-
From: Rob Dixon [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 9:18 AM
To: [EMAIL PROTECTED]
Subject: Re: Opening a new shell
Anthony J Segelhorst wrote:
>
> Basically I am writin
> Dan Muey wrote:
> >
> > In developing a module and I am torn.
> >
> > I want to use the newer our $variable; but to make it work with pre
> > 5.6 Perl (or whatever version our appeared in) I have to do the use
> > vars qw($variable); method
> >
> > So I was wanting some input about pros and c
Dan Muey wrote:
>
> Rob Dixon wrote:
> >
> > Dan Muey wrote:
> > >
> > > In developing a module and I am torn.
> > >
> > > I want to use the newer our $variable; but to make it work
> > > with pre 5.6 Perl (or whatever version our appeared in) I
> > > have to do the use vars qw($variable); method
>
On Tue, Oct 28, 2003 at 10:52:16AM -0600, Dan Muey wrote:
> I want to use the newer our $variable; but to make it work
> with pre 5.6 Perl (or whatever version our appeared in) I
> have to do the use vars qw($variable); method
>
> So I was wanting some input about pros and cons of using
> eithe
Can anyone recommend the best way to do this in Perl.
There are a lot of modules out there and also IO::Socket.
Just looking for a good starting place.
Thanks
> "use vars" and "our" do roughly the same thing. They both
> let you use package variables under strict without fully-qualifying.
>
> All these code snippets pass strict, and they each set the
> package variable $foo ($A::foo, $B::foo, and $C::foo).
>
> use strict;
>
> {
> pack
Hi D',
I agree whatever you are saying.
But i need to support somebody's code without annoying users by breaking their old
code which depends on this interface.
Yes, i can expand the scope of the routine now and let users pass in the additional
information.
But again if i can guess it somehow,
Hello list,
I am having a problem coming up with a solution to compare and find the
difference between two dates.
One of the dates is a GMT date while the other is PST(or PDT) so my
first
Problem is converting the local date to GMT which is fine unless I want
to automagically "detect" the hour
Hmm ok, what would be nice is to do something like this:
(I have a function that returns true if the perl version is the same or higher than
the specified number)
package Monkey;
use strict;
if(gotperlv(5.6)) {
our $bar
our $foo;
} else {
use vars qw($bar $foo);
}
Exce
>
> Can anyone recommend the best way to do this in Perl.
> There are a lot of modules out there and also IO::Socket.
> Just looking for a good starting place.
> Thanks
>
>
>
http://poe.perl.org/?POE_Cookbook
Particularly the IRC Programming section.
http://danconia.org
--
To unsubscribe,
How Do I initialize an empty array so thtat I don't get an unitiialized
error?
...
my @rows;
I thought I could do something like @rows = new (); but it's not working.
thanks
-
eMail solutions by
http://www.swanmail.com
--
To unsubscribe, e-mail: [EMAI
Many of your questions lately have been wrapped around
scoping/packages/symbol tables, etc. have you had a read through:
http://perl.plover.com/FAQs/Namespaces.html
?? I found it most informative.
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail
On Tue, Oct 28, 2003 at 12:14:05PM -0600, Dan Muey wrote:
> Hmm ok, what would be nice is to do something like this:
> (I have a function that returns true if the perl version is the same or
> higher than the specified number)
>
> package Monkey;
>
> use strict;
>
> if(gotperlv(5.6)) {
> o
> How Do I initialize an empty array so thtat I don't get an unitiialized
> error?
>
> ...
> my @rows;
>
> I thought I could do something like @rows = new (); but it's not working.
>
Drop the 'new':
my @rows = ();
http://danconia.org
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additi
>
>
> > How Do I initialize an empty array so thtat I don't get an unitiialized
> > error?
> >
> > ...
> > my @rows;
> >
> > I thought I could do something like @rows = new (); but it's not
working.
> >
>
> Drop the 'new':
>
> my @rows = ();
>
Are you sure you are getting the warning on
thanks. it works.
@rows=();
--
>
>
>> How Do I initialize an empty array so thtat I don't get an unitiialized
>> error?
>>
>> ...
>> my @rows;
>>
>> I thought I could do something like @rows = new (); but it's not
>> working.
>>
>
> Drop the 'new':
>
> my @rows = ();
>
> http://danconia.org
>
You could always use something like Time::Local to break the dates down to
time() format and then subtract 8 hours or whatever you need to do, then
subtract one date from the other.
-Original Message-
From: Steve Main [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 10:15 AM
To:
<[EMAIL PROTECTED]> wrote:
>
> How Do I initialize an empty array so thtat I don't get an unitiialized
> error?
>
> ...
> my @rows;
>
> I thought I could do something like @rows = new (); but it's not working.
You don't.
my @rows;
declares an array, which is initially empty. If you put
somethi
> On Tue, Oct 28, 2003 at 12:14:05PM -0600, Dan Muey wrote:
> > Hmm ok, what would be nice is to do something like this:
> > (I have a function that returns true if the perl version is
> the same
> > or higher than the specified number)
> >
> > package Monkey;
> >
> > use strict;
> >
> > if(go
Do a search on www.cpan.org for Date::Pcalc. This is a whole series of Perl functions
dealing with date calculations. (And I didn't even write them.)
> -Original Message-
> From: Steve Main [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, October 28, 2003 1:15 PM
> To: [EMAIL PROTECTED]
> Sub
On Tue, Oct 28, 2003 at 01:44:58PM -0600, Dan Muey wrote:
>> If you don't care about older perls (and 5.005_03 is getting
>> kind of mouldy) then do something like
>>
>> use 5.006;
>>
>> use base qw(Exporter);
>
> And that brings up another issue:
> what is the difference between:
>
> On Tue, Oct 28, 2003 at 01:44:58PM -0600, Dan Muey wrote:
> >> If you don't care about older perls (and 5.005_03 is getting
> >> kind of mouldy) then do something like
> >>
> >> use 5.006;
> >>
> >> use base qw(Exporter);
> >
> > And that brings up another issue:
> > what is the differ
Any one know at what point one needs to do auth() in a standard Net::SMTP session?
Do I do it first thing after new or ??
I'm currently doing:
new()
mail()
to()
data()
datasend()
quit()
So where do I put auth() in all that?
Thanks!
Dan
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additi
Steve Grazzini wrote:
On Mon, Oct 27, 2003 at 09:52:20PM -0600, Andrew Gaffney wrote:
I have an array of keywords that I need to generate. I have 2 separate
input files. The first one contains the defaults. The second input file
contains additions and overrides. For example, first input:
key1 k
> The sequence is:
>
> new()
> auth()
> mail()
> to()
> data()
> datasend()
> dataend()
> quit()
>
> Josimar
Thanks Josimar!
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
What may be wrong with my codes? Perl complains of use of uninitialized
value at addition and in range (or flop).
Thanks
#
#!/usr/bin/perl -w
use strict;
my ($xi, $i, @numbers, @slice);
@numbers = (1..10);
$i = 0;
$xi = 0;
open(RS, ">perd.dat") || die "
On Tue, Oct 28, 2003 at 10:51:20PM +0100, B. Fongo wrote:
> What may be wrong with my codes? Perl complains of use of uninitialized
> value at addition and in range (or flop).
>
> #!/usr/bin/perl -w
> use strict;
>
> my ($xi, $i, @numbers, @slice);
> @numbers = (1..10);
> $i = 0;
> $xi = 0;
>
>
In article <[EMAIL PROTECTED]>, Mike M wrote:
> I've found this script on another message board that is close, but still
> doesn't work with my data. Any ideas on modifications? I think my
> biggest problem is the regex in the split function, because what this does
> is match ONLY against the fir
In article <[EMAIL PROTECTED]>, Rob Dixon wrote:
> Kevin Pfeiffer wrote:
>>
>> I would have thought that this would initialize my $indent variable to 2
>> (like setting an initial state for an object), but if I call "indent()" I
>> get nothing back. :-(
>>
>>
>> { # static local variable
>>my
Hi all can anyone help with a direct command line syntax for the following
im trying to add text to the end of the last line in a text file like so
aaa
bbb
ccc
Wishing to add ddd on the end of this list.
I have tried the following but it doesnt have quite the desired effect
any help would be good.
I would recommend getting a strong grasp of Perl before you start trying to
make one-liners for problems like this, since you can end up making a simple
problem much more complicated. What's wrong with this:
use strict;
use warnings;
open(OUTFILE,">>script1") || die "Couldn
On Tuesday 28 Oct 2003 5:42 pm, [EMAIL PROTECTED] wrote:
> Gary,
>
>I think your closer to what I was thinking of.
>It makes more sense. Currently, This is what I
>Have so far not with your suggestions as of yet.
>
[snip]
>
> #
> # Get the host name of system
> #
> my @lines = $telnet->
On Tuesday 28 Oct 2003 7:20 pm, you wrote:
> Gary,
>
>While your structure make sense. I'm a little lost here.
>
>Do you mind given me the basic on the my %whichos
>
>I don't think I've ever come across this before and need some
>Explaination on that.
>
>Thanks
> Phillip
>
[snip
Thanks for the response.
I have been using Date::Pcalc but I guess what I have been unable to
find is an example of how to get the localtime from the system in GMT
format, with the offset already applied. As I understand as the local
time falls back an hour or springs ahead the offset will change
B. Fongo <[EMAIL PROTECTED]> wrote:
:
: What may be wrong with my code? Perl complains of
: use of uninitialized value at addition and in range
: (or flop).
: #
:
: #!/usr/bin/perl -w
: use strict;
:
: my ($xi, $i, @numbers, @slice);
: @numbers = (1..10)
Gary,
That was my reasons for my question originally, I've already
Modified the new version of the script to for loop the routine
So it could go thru the commands when the OS has been determined.
I really do appreciate that feedback.
My original reasoning for using Text::CSV cause
I had emailed this query out previously but since I
never saw my own email in the digest, I'm assuming
that it never made it to the [EMAIL PROTECTED] list.
Please forgive me if it did and I did not see it (my
SPAM filter might have eaten it).
Question #1
---
I have an array stored in an o
On Oct 28, Richard Heintze said:
>I have an array stored in an object and I trying to
>compute the length of the array. This seemed to work
>initially:
The LENGTH of an array is @array or @{ $ref_to_array }. The LAST INDEX of
an array is $#array or $#{ $ref_to_array }.
>my $nColumns = [EMAIL PR
Is there anything wrong with this code?
my $sth = $dbh->prepare($query);
$sth->execute;
my $ref = $sth->fetchrow_hashref;
while($ref) {
$totalhrs += $ref->{quantity};
my $tmpdate = $ref->{id};
$tmpdate =~ s/(\d{4})(\d{2})(\d{2})\d+/$2-$3-$1/;
print "$tmpdate$ref->{item}$ref->{quantity}";
Andrew Gaffney wrote:
Is there anything wrong with this code?
my $sth = $dbh->prepare($query);
$sth->execute;
my $ref = $sth->fetchrow_hashref;
while($ref) {
$totalhrs += $ref->{quantity};
my $tmpdate = $ref->{id};
$tmpdate =~ s/(\d{4})(\d{2})(\d{2})\d+/$2-$3-$1/;
print
"$tmpdate$ref->{it
Another way to do it is:
while($ref = $sth->fetchrow_hashref){
do something...
}
-Original Message-
From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 28, 2003 10:00 PM
To: [EMAIL PROTECTED]
Subject: Re: DBI
Andrew Gaffney wrote:
> Is there anything wrong with th
60 matches
Mail list logo