How do I simulate an array of structures in perl?
eg.
struct {
int a;
int b;
int c
} STRUCT1;
int STRUCT1 s[5];
s[1].a =1;
s[1].b =2;
s[1].c =3;
How would I write this in perl?
Thanks.
The information contained in this message may
How would you define c type structures in perl?
eg.
struct {
int a;
int b;
int c
} STRUCT1;
int STRUCT1 s;
s.a =1;
s.b =2;
s.c =3;
How would I write this in perl?
Thanks.
The information contained in this message may be privileged
gurus,
OK, shoot me for asking a dumb question.
I have a string of the following
$str = "X1=1,Y1=2,Z1=3";
I want to assign the values to the right hand side of the "=" to 3 new
variables so the final result is
$a=1
$b=2
$c=3
How do I get those values assigned to $a, $b, $c
Thanks
=
Hello,
I have 2 independent perl programs p1 and p2. p1 calls p2 (using either the
system() or `` operators, and p2 will print
out status information every 2 seconds or so. How do I set it up such
that whenever p2 prints out data, it is printed out by p1 also IN REAL TIME?
Thanks.
=
I have the following
$x = ~rambo/bin/script1; (where script1 is an executable shell script)
$ret = `x`;
The above will not work.
However if I define
$x = /home/apple/rambo/bin/script1; (ie I give a full pathname)
$ret = `x`;
This will work.
How do I make the first example work? By the way,
What is the best way to get the difference betwen 2 dates that I obtain
from localtime
I want to do something like
$t1=localtime();
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I am writing a perl script. In it, I need to call another script that
happen to be written in tcl. I need to pass arguments to that tcl script.
Also, I need to get some return values from that tcl script.
What is the best way for me to do that?
Thanks.
==
I need someone to tell me the function that will convert time in this
format to epoch time: 1/17/2002 11:15 AM
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
I am looking for a perl program to keep track of appointments and send
me a reminder via email 5 minutes before the appointment. I am sure this
has been done before and dont want to reinvent the wheel. Any help is
appreciated.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional command
I have 2 directories:
x/y/z and a/b/c
within both directories, I have the same files say a1.c thro a10.c
I would like to write a perl script to go through all the files in each
directory and print out the filename if there is a difference between the
corresponding files.
I know of many ways
Hello,
This forum is a really good way to learn a new language.
Can anyone suggest a mailing list like this for C, C++, Java programming?
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Is there any way to imbed expect commands in perl like you could in Tcl?
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
hello,
Thanks. For the info. Now, how about if I want to get a return value
from the called c or perl program?
On Fri, 2 Nov 2001, Pete Emerson wrote:
> Yes, you can do it. Here's four files. First, Perl calling a C program:
>
> chelloworld.c gcc -o chelloworld chelloworld.c
>
> #
hi,
How do I imed a c program in a perl script. For example I would like
to have a perl script call a "hello world" executable file what was
compiled in unix.
Can I do the reverse? IE have a C program call a perl script that just
prints "hello world".
I don't have a specific problem to solve.
hello,
can anyone suggest a good online resource for perl/tk. One that has
graphical examples of all the possible widgets. The "Learning Perl/TK"
book is not very helpful. It doesn't show the widgets.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTE
hi,
Is there any way to return 2 or 3 scalar variables from a subroutine (like
passing a variable by reference in C)?
I would like to avoid returning an array, if possible, because it makes
the script very non-intuitive.
Thanks
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
hi,
I have the following string
$a =
"buy 10/23/01 100 12.625 50 25.25 \n
buy 10/25/01 100 12.625 50 25.25 \n
buy 09/1/01 100 12.625 50 25.25 \n
buy 1/23/01 100 12.625 50 25.25 \n";
I would like to sort this by the date (ie the second field) in the
above string.
So it looks like this:
$
hi
I have an variable of the following format
$i = "buy 10/23/01 50 25.25 50 25.25"
Now, I would like to multiply the 3 and 4th fields by a factor (say 2)
so I get the following
$i = "buy 10/23/01 100 50.50 50 25.25"
How do I do this?
Thanks.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
hi,
Sorry to bother everyone. But I am learning a lot from this daily Perl
mailing list. Can someone recommend a good mailing list to subscribe
for C programming?
Thanks.
19 matches
Mail list logo