Hi Peter,
On 2 Mar 2012 02:48:28 -
Peter Scott wrote:
> On Sun, 26 Feb 2012 20:30:56 +0100, Manfred Lotz wrote:
> > I want to run a shell command with the following constraints:
> >
> > a. I like to get the return code of the command b. Furthermore I want to
> > combine stdout and stderr so
Shlomi Fish wrote:
On 2 Mar 2012 02:48:28 -
Peter Scott wrote:
It doesn't have flaws. You could do it without the module with a piped
open:
sub run_cmd
{
my $cmd = shift;
open my $fh, '-|', "$cmd 2>&1" or die "open: $!";
print while<$fh>;
close $fh;
return $?>> 8;
}
I
$ perl extract.pl try.tex
Bareword "filename" not allowed while "strict subs" in use at extract.pl line 8.
Execution of extract.pl aborted due to compilation errors.
#!/usr/bin/env perl
use strict;
use warnings;
my $filename = $ARGV[0] ;
open FILE, "<", filename or die $!;
my @line = ;
whil
On 2012-03-03 09:08, lina wrote:
$ perl extract.pl try.tex
Bareword "filename" not allowed while "strict subs" in use at extract.pl line 8.
Execution of extract.pl aborted due to compilation errors.
#!/usr/bin/env perl
use strict;
use warnings;
Good.
my $filename = $ARGV[0] ;
open FILE, "
On Sat, Mar 3, 2012 at 9:08 AM, lina wrote:
> $ perl extract.pl try.tex
> Bareword "filename" not allowed while "strict subs" in use at extract.pl line
> 8.
> Execution of extract.pl aborted due to compilation errors.
>
>
> #!/usr/bin/env perl
>
> use strict;
> use warnings;
>
> my $filename = $A
Thanks for both of you.
Your guys are great.
Best regards,
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/
Hi,
I want to output the result into the file shared the same basename but
different extensions,
Below is what I have come up so far:
perl try.tex
#!/usr/bin/env perl
use strict;
use warnings;
use File::Basename;
my $bib_filename = "/home/lina/texmf/bibtex/bib/biophymd.bib";
my $bib_abbrev_f
Hi lina,
On Sun, 4 Mar 2012 00:37:58 +0800
lina wrote:
> Hi,
>
> I want to output the result into the file shared the same basename but
> different extensions,
>
> Below is what I have come up so far:
>
> perl try.tex
>
> #!/usr/bin/env perl
>
> use strict;
> use warnings;
> use File::Basen
On 12-03-03 11:37 AM, lina wrote:
my $tex_filename = $ARGV[0] ;
# for catfile()
use File::Spec;
# divide the input file name into its path and name,
# ignore its extension
my ( $name, $path ) = fileparse( $tex_filename, qr/\.[^\.]+$/ );
# create a new name with .bib extension
my $output_text_
Hi all,
I have a need to examine and manipulate certain aspects of a class
symbol table. I can do this:
my $dog = Animal->new();
foreach my $entry ( keys %Animal:: ){
...
}
...but what I'd like to do is dereference the object itself to get the
class, as there will be times I won't know w
On Sat, Mar 03, 2012 at 01:51:28PM -0500, Steve Bertrand wrote:
> Hi all,
>
> I have a need to examine and manipulate certain aspects of a class
> symbol table. I can do this:
>
> my $dog = Animal->new();
> foreach my $entry ( keys %Animal:: ){
> ...
> }
>
> ...but what I'd like to do is der
On 03/03/2012 01:51 PM, Steve Bertrand wrote:
Hi all,
I have a need to examine and manipulate certain aspects of a class
symbol table. I can do this:
you claim you have this need but given your skill level, i wonder if
that is actually a real need. please state the larger problem you are
tr
On 2012-03-03 14:18, Paul Johnson wrote:
On Sat, Mar 03, 2012 at 01:51:28PM -0500, Steve Bertrand wrote:
Is there a proper way to do this that someone could point out?
no strict "refs";
foreach my $entry ( keys %{ ref($dog) . "::" })
But why? If you really need class introspection then OK,
On Sat, Mar 03, 2012 at 02:42:35PM -0500, Steve Bertrand wrote:
> I've been writing a program that will perform extra work for
> diagnostics upon each method call.
>
> As of now, I need to write a call to an outside function manually
> into each method. To automate this so the original methods do
On 03/03/2012 02:42 PM, Steve Bertrand wrote:
I've been writing a program that will perform extra work for diagnostics
upon each method call.
attributes can do that for each sub. there are modules that let you call
code before/after each method call. or class techniques that allow that.
Anyone has any experience to share about implementing perl CGI scripts
on Hiawatha web server?
ty.
R
I was wondering if anyone here has looked into the Rasberry Pi project?
I just got wind of it a couple days ago and it looks pretty exciting. From
their home page:
"The Raspberry Pi is a credit-card sized computer that plugs into your TV and a
keyboard. It’s a capable little PC which can be use
Thanks for the share. Some of us already know.
Bad thing is there will be a long waiting list. There is more demand than
they can supply.
Best Regards,
Manuel
On Sat, Mar 3, 2012 at 10:08 PM, Bill Stephenson wrote:
> I was wondering if anyone here has looked into the Rasberry Pi project?
>
> I
On Fri, 02 Mar 2012 21:31:50 +0100, Manfred Lotz wrote:
> Another question I have: Where do I find what '-|' means? I mean the
> minus before the pipe char.
perldoc -f open
--
Peter Scott
http://www.perlmedic.com/ http://www.perldebugged.com/
http://www.informit.com/store/product.aspx?isbn=
On 4 Mar 2012 05:03:55 -
Peter Scott wrote:
> On Fri, 02 Mar 2012 21:31:50 +0100, Manfred Lotz wrote:
> > Another question I have: Where do I find what '-|' means? I mean the
> > minus before the pipe char.
>
> perldoc -f open
>
>
Thanks, found it there.
--
Manfred
--
To unsubscribe
20 matches
Mail list logo