LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-09-2007, 05:43 PM   #1
knowram
LQ Newbie
 
Registered: Mar 2007
Posts: 9

Rep: Reputation: 0
deleting in a .pl scrip


I am a first time poster an new to scripting. I found a cool little script at

http://herselfswebtools.com/2007/02/...p-for-osx.html

I have changed it a little so it will take sequential images. I would also like to a line to delete the image from the local host after it is uploaded.

how would I do this?

Thanks for the help
 
Old 03-09-2007, 05:47 PM   #2
dannystaple
Member
 
Registered: Apr 2006
Location: London, Uk
Distribution: Ubuntu on Desktop
Posts: 121

Rep: Reputation: 15
Quote:
Originally Posted by knowram
I am a first time poster an new to scripting. I found a cool little script at

http://herselfswebtools.com/2007/02/...p-for-osx.html

I have changed it a little so it will take sequential images. I would also like to a line to delete the image from the local host after it is uploaded.

how would I do this?

Thanks for the help
The simplest way in perl might be just to use the backtick operator and the system rm command:
`rm $filetoremove`.
This should do the trick. It is not the most perlish way. Perl may have an "unlink" command as a builtin which will do it in a more perl only fashion.

Looking here - http://perldoc.perl.org/perlfunc.html - I think that unlink will do the trick - http://perldoc.perl.org/functions/unlink.html.
 
Old 03-09-2007, 06:09 PM   #3
knowram
LQ Newbie
 
Registered: Mar 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks worked great
 
Old 03-09-2007, 09:51 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Moved to a more appropiate forum.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Scrip to bootsplash hraposo Debian 3 01-09-2007 06:21 PM
scrip for filtering text files irfanhab Programming 3 04-09-2006 02:18 AM
help with scrip tuananhbirm Linux - General 4 02-04-2005 06:30 PM
Can I use a scrip to mount a drive on network? Tiyogi Linux - Newbie 4 05-05-2004 03:02 AM
ppp scrip for auto login cvbuty Linux - Networking 0 01-27-2004 07:08 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration