Sponsored Content
Top Forums Shell Programming and Scripting Perl newbie question re: variables Post 302355422 by pludi on Tuesday 22nd of September 2009 04:32:43 PM
Old 09-22-2009
You mean like this:
Code:
$ perl -we '$str = "old"; ( $var = $str ) =~ s/old/new/; print $str, "\n", $var, "\n";'
old
new

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

newbie question

hi im thinking of getting unix but i have no idea where to start I know that its an OS similar to linux but what hardware does in run on? i've heard of solaris but im not quit sure what it is thankxs (3 Replies)
Discussion started by: ninja
3 Replies

2. UNIX Desktop Questions & Answers

Newbie Question

I am fairly new to *nix/linux and I have just installed SuSe 8.2. I am wondering what skills would be good to learn. I know that I will need to learn how to write scripts, but what scripting languages should I learn. I greatly appreciate any and all comments. ... (5 Replies)
Discussion started by: Ntalektual
5 Replies

3. Shell Programming and Scripting

Newbie question

Hello, I have text file while looks this test1 test2 test3 test4 test5 test6 and if I want to parse it and make new file which would like this test1 test2 test3 test4 test5 test6 How can I do this in korn shell script Thanks (9 Replies)
Discussion started by: peeyush_23
9 Replies

4. Shell Programming and Scripting

Perl newbie question

Can someone tell me what this is doing? I know it is reading records from a table and puts them in a hash. How do I print out, let's say, the first 5 columns of data (assuming columns are named col1, col2, ...)? $sth = $dbh->prepare("select * from stsc.loc ... (2 Replies)
Discussion started by: ssmiths001
2 Replies

5. UNIX for Dummies Questions & Answers

UNIX newbie NEWBIE question!

Hello everyone, Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware. I hope I am not missing anything! :p (4 Replies)
Discussion started by: Hanamachi
4 Replies

6. Shell Programming and Scripting

perl newbie . &&..programming newbie (question 2)

Hello everyone, I am having to do a lot of perl scripting these days and I am learning a lot. I have this problem I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files.. there is folder1\folder2\*.gz and there are about 50 folders... (1 Reply)
Discussion started by: xytiz
1 Replies

7. Shell Programming and Scripting

perl newbie . &&..programming newbie

Hi, I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script. I have a files named in this format... (13 Replies)
Discussion started by: xytiz
13 Replies

8. UNIX for Dummies Questions & Answers

perl newbie question

I have the following question in perl, I have come up with couple of solutions,Perl gurus please help me find the best answer to my question? You have a PERL database named DataEntryData, and you need to separate out the various values from the DB entry $item, delimited by the ^ sumbol. There... (2 Replies)
Discussion started by: ramky79
2 Replies

9. Shell Programming and Scripting

Hidden Characters in Regular Expression Matching Perl - Perl Newbie

I am completely new to perl programming. My father is helping me learn said programming language. However, I am stuck on one of the assignments he has given me, and I can't find very much help with it via google, either because I have a tiny attention span, or because I can be very very dense. ... (4 Replies)
Discussion started by: kittyluva2
4 Replies

10. Programming

PERL: In a perl-scripttTrying to execute another perl-script that SETS SOME VARIABLES !

I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open()) I would like to run another PERL-script from first one, not... (1 Reply)
Discussion started by: alex_5161
1 Replies
XltWorking(3X)															    XltWorking(3X)

NAME
XltWorking - Convenience function to display a Working dialog, and update the bar graph in the dialog. SYNOPSIS
#include <Xlt/Xlt.h> Boolean XltWorking(widget, question, percent_done) Widget widget; String question; int percentdone; DESCRIPTION
XltWorking Creates a dialog containing a message string, a bar showing the percentage of the task complete, and an abort button. When called with a percent_done value of zero the dialog is managed, and a timer installed to update the bar every second. If question is not NULL, the message string in the dialog is set to this. When called with a percent_done of 100, the dialog is un-managed. If called with a percent_done of -1, only the message is changed. Any value between 0 and 100 will cause the bar graph to be updated the next time the timer fires, and processes any pending timer and X events. If the return value is True, the user has requested that the task should be aborted. widget The widget to wait for. question The message to display in the working dialog. Or NULL, meaning no change. percent_done The percentage of the task complete. 0 will cause the dialog to be managed. 100 will cause the dialog to be un-managed. -1 will update the question only. Any value between 0 and 100 will update the bar graph. RETURN VALUE
Boolean, if True the abort button was pushed, or the window was closed by the window manager. RELATED INFORMATION
XltWorking(3X)
All times are GMT -4. The time now is 11:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy